/**
 * <bottom-nav> — light-DOM styles
 * Mirrors the shadow-DOM styles in bottom-nav.js for non-component usage.
 * Exact y888.com reference specs — see bottom-nav.js header for details.
 */

bottom-nav {
  display: block;
  width: min(100%, 56.2219vh);
  max-width: 100%;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  color-scheme: dark;
}
bottom-nav a:focus, bottom-nav button:focus { outline: none; }

.bottom-nav {
  display: flex;
  width: 100%;
  height: 1.24rem;
  background-color: var(--skin__web_btmnav_db, #1E1E1E);
  box-shadow: .02rem 0 .06rem rgba(0, 0, 0, .1);
  font-family: var(--y888-font-family);
  position: relative;
  z-index: 2;
  --icon-size: .5rem;
}

.bottom-nav .nav-item {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 .05rem;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.bottom-nav .nav-itemContent {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  padding-bottom: .08rem;
  box-sizing: border-box;
}

.bottom-nav .nav-icon {
  position: relative;
  display: block;
  line-height: 0;
  z-index: 1;
  color: var(--skin__btmnav_def, #757575);
}

.bottom-nav .nav-icon svg {
  width: auto;
  height: var(--icon-size);
  font-size: .48rem;
  display: block;
  line-height: 0;
  z-index: 1;
}

.bottom-nav .nav-icon svg.nav-icon__base {
  position: relative;
}

.bottom-nav .nav-icon__base {
  color: var(--skin__btmnav_def, #757575);
}

.bottom-nav .nav-icon__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: var(--skin__btmnav_active, #EB05F2);
}

.bottom-nav .nav-icon__active {
  display: none;
  color: var(--skin__btmnav_active, #EB05F2);
}

.bottom-nav .nav-item.is-active .nav-icon__base,
.bottom-nav .nav-item.is-active .nav-icon__accent {
  display: none;
}

.bottom-nav .nav-item.is-active .nav-icon__active {
  display: block;
}

.bottom-nav .nav-text {
  color: var(--skin__btmnav_def, #757575);
  font-size: .24rem;
  word-break: break-word;
  display: -webkit-box;
  text-overflow: ellipsis;
  vertical-align: middle;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  height: .54rem;
  line-height: 1.2;
  overflow: hidden;
  z-index: 2;
  margin-top: .02rem;
}

.bottom-nav .nav-item.is-active .nav-text {
  color: var(--skin__btmnav_active, #EB05F2);
}

/* Badge: exact reference ui-badge specs */
.bottom-nav .nav-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  z-index: 5;
  display: inline-block;
  box-sizing: border-box;
  min-width: .32rem;
  max-width: 1.2rem;
  height: .28rem;
  padding: 0 .08rem;
  font-size: .18rem;
  font-weight: 400;
  line-height: .28rem;
  text-align: center;
  color: #fff;
  background: var(--skin__accent_2, #EA4E3D);
  --badge-bg-color: var(--skin__accent_2, #EA4E3D);
  border-radius: .13rem .13rem .13rem 0;
  white-space: nowrap;
  overflow: visible;
  vertical-align: middle;
}

.bottom-nav .nav-badge__content {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
  display: block;
}

.bottom-nav .nav-badge:before {
  content: "";
  display: inline-block;
  position: absolute;
  bottom: -.06rem;
  z-index: 20;
  left: 0;
  width: 0;
  height: 0;
  border-left: .079rem solid var(--badge-bg-color, var(--skin__accent_2, #EA4E3D));
  border-top: .066rem solid transparent;
  border-bottom: .066rem solid transparent;
  font-size: 0;
}

.bottom-nav .nav-badge--red {
  background: var(--skin__accent_2, #EA4E3D);
  --badge-bg-color: var(--skin__accent_2, #EA4E3D);
}

/* Safe-area fill (matches y888.com body.safe-area-inset-bottom::after) */
:root {
  --skin__safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}
body.safe-area-inset-bottom::after {
  content: "";
  display: block;
  height: var(--skin__safe-area-inset-bottom);
  background-color: var(--skin__web_btmnav_db, #1E1E1E);
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 56.2219vh);
  bottom: 0;
  z-index: 99;
  pointer-events: none;
}
