/* LA2.WORLD / Sphere cabinet — desktop navigation & profile layout only.
   Original mobile/tablet menu geometry is preserved. Loaded AFTER reference/header styles. */
/* Keep one logo: original left header location on desktop and mobile. */
body.la2w-reference .la2w-desktop-brand-holder { display: none; }
body.la2w-reference .la2w-avatar-ring {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #d89d54; border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg,#513119,#090d12);
  box-shadow: inset 0 0 7px rgba(255,193,109,.16),0 0 8px rgba(228,139,53,.28);
  overflow: hidden;
}
body.la2w-reference .la2w-avatar-ring img,
body.la2w-reference .la2w-avatar-ring video {
  display: block; width: 30px; height: 30px; border-radius: 50% !important;
  object-fit: cover;
}
body.la2w-reference .la2w-profile-details { display: none; }
body.la2w-reference .la2w-admin-desktop-entry { display: none !important; }

@media (min-width: 992px) {
  /* Sidebar: 54px reference height -> 27px desktop; text and icons increased by exactly 2px. */
  body.la2w-reference #sidebar .main-menu .slide > a.side-menu__item,
  body.la2w-reference #sidebar .la2w-admin-links .slide > a.side-menu__item {
    min-height: 27px !important;
    height: 27px !important;
    padding: 3px 11px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.1 !important;
    box-sizing: border-box !important;
  }
  body.la2w-reference #sidebar .main-menu .slide > a.side-menu__item .side-menu__label,
  body.la2w-reference #sidebar .la2w-admin-summary .side-menu__label {
    font: normal 13.5px/1.15 Georgia,serif !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body.la2w-reference #sidebar .main-menu .slide > a.side-menu__item .side-menu__icon,
  body.la2w-reference #sidebar .la2w-admin-summary .side-menu__icon {
    font-size: 17px !important;
    width: 18px !important;
    min-width: 18px !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
  }
  body.la2w-reference #sidebar .main-menu .slide > a.side-menu__item .badge {
    font-size: 9px !important; padding: 2px 4px !important;
    line-height: 1.1 !important; margin-left: auto !important;
  }
  body.la2w-reference #sidebar .main-menu > .slide__category {
    min-height: 22px !important;
    padding: 4px 11px !important;
    margin: 5px 0 1px !important;
  }
  body.la2w-reference #sidebar .main-menu > .slide__category .category-name {
    font-size: 10px !important; line-height: 1.1 !important;
  }
  body.la2w-reference #sidebar .la2w-admin-mobile-entry { display: none !important; }
  body.la2w-reference #sidebar .la2w-admin-desktop-entry { display: list-item !important; }
  body.la2w-reference #sidebar .la2w-admin-details { display: block; margin: 2px 0 5px; }
  body.la2w-reference #sidebar .la2w-admin-summary {
    display: flex; align-items: center; gap: 8px;
    height: 30px; padding: 3px 11px; cursor: pointer;
    color: #ffe0aa; border-top: 1px solid #735032;
    border-bottom: 1px solid #735032;
    background: linear-gradient(90deg,#25190f,#0c1117);
    list-style: none; user-select: none;
  }
  body.la2w-reference #sidebar .la2w-admin-summary::-webkit-details-marker { display:none; }
  body.la2w-reference #sidebar .la2w-admin-summary::marker { content: ''; }
  body.la2w-reference #sidebar .la2w-admin-summary:hover,
  body.la2w-reference #sidebar .la2w-admin-summary:focus-visible {
    color: #ffe7bc; background: linear-gradient(90deg,#563015,#14161b);
    outline-color: #e7b269;
  }
  body.la2w-reference #sidebar .la2w-admin-chevron {
    margin-left: auto; font-size: 12px; transition: transform .18s ease;
  }
  body.la2w-reference #sidebar .la2w-admin-details[open] .la2w-admin-chevron {
    transform: rotate(180deg);
  }
  body.la2w-reference #sidebar .la2w-admin-links { margin: 0; padding: 0; list-style: none; }
  body.la2w-reference #sidebar .la2w-admin-links .side-menu__item { padding-left: 20px !important; }
  /* Profile: actual Sphere nickname and role, NOT email. */
  body.la2w-reference .la2w-user-info .header-link { min-width: 0; padding: 7px 9px !important; }
  body.la2w-reference .la2w-profile-inline { display: flex; gap: 9px; min-width: 0; }
  body.la2w-reference .la2w-profile-details {
    display: flex !important; flex-direction: column; justify-content: center;
    gap: 4px; max-width: 170px; min-width: 0;
  }
  body.la2w-reference .la2w-profile-name {
    font: 600 13px/1.05 Arial,sans-serif; color:#f9e2bc;
    white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
  }
  body.la2w-reference .la2w-profile-role {
    font: 10px/1.05 Arial,sans-serif; color:#bf9e76;
    white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
  }
  /* The original LA2.WORLD logo remains on the LEFT on desktop. */
  body.la2w-reference .header-content-left .horizontal-logo { display: flex !important; align-items: center; }
  body.la2w-reference .la2w-desktop-brand-holder { display: none !important; }

}
@media (min-width: 992px) and (max-width: 1199.98px) {
  body.la2w-reference .la2w-profile-details { max-width: 140px; }
  body.la2w-reference .la2w-profile-role { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* 2026-10-31: Profile dropdown and full-height, visible sidebar background.
   Desktop-only. Keep the 27px nav height, 13.5px labels, 17px icons. */
@media (min-width: 992px) {
  /* A slightly wider avatar/nickname hit area and dropdown (not a redesign). */
  body.la2w-reference .la2w-user-info > .header-link {
    min-width: 213px !important;
    padding: 8px 14px !important;
  }
  body.la2w-reference .la2w-user-info > .header-profile-dropdown {
    min-width: 280px !important;
    max-width: min(340px, 90vw) !important;
    padding-inline: 6px !important;
    box-sizing: border-box !important;
  }
  body.la2w-reference .la2w-user-info > .header-profile-dropdown .dropdown-item a {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  /* Previous fs-11 (11px) minus the requested 2px. */
  body.la2w-reference .la2w-user-info > .header-profile-dropdown .drop-heading .fs-11 {
    font-size: 9px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
  }

  /* Sphere's 90% body zoom makes 100dvh boxes 10% too short on screen.
     111.111dvh * 0.9 = 100dvh, then subtract the zoomed 83px header. */
  body.phoenix-cabinet.la2w-reference .page {
    min-height: 111.111vh !important;
    min-height: 111.111dvh !important;
  }
  body.phoenix-cabinet.la2w-reference .page > aside#sidebar.app-sidebar {
    height: calc(111.111vh - 83px) !important;
    height: calc(111.111dvh - 83px) !important;
    max-height: calc(111.111dvh - 83px) !important;
    background-color: #080e13 !important;
    background-image:
      linear-gradient(180deg, rgba(5,10,16,.65) 0%, rgba(5,10,16,.40) 53%, rgba(5,10,16,.18) 100%),
      url('../la2world/reference/sidebar-scene.jpg') !important;
    background-size: cover, cover !important;
    background-position: center center, center center !important;
    background-repeat: no-repeat, no-repeat !important;
  }
  body.phoenix-cabinet.la2w-reference .page > aside#sidebar.app-sidebar #sidebar-scroll.main-sidebar {
    height: 100% !important;
    max-height: 100% !important;
    padding-bottom: 18px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* The game scene remains visible through normal rows; keep text readable. */
  body.phoenix-cabinet.la2w-reference #sidebar .main-menu .slide > a.side-menu__item {
    background: linear-gradient(90deg, rgba(7,12,18,.72), rgba(7,12,18,.58)) !important;
  }
  body.phoenix-cabinet.la2w-reference #sidebar .main-menu .slide.active > a.side-menu__item,
  body.phoenix-cabinet.la2w-reference #sidebar .main-menu .slide > a.side-menu__item:hover {
    background: linear-gradient(90deg, rgba(94,52,19,.87), rgba(30,24,20,.79)) !important;
  }
}

/* Keep the mobile off-canvas background reaching the bottom despite Sphere's 90% zoom.
   Does not alter menu typography, row heights, or the opening mechanism. */
@media (max-width: 991.98px) {
  body.phoenix-cabinet.la2w-reference .page { min-height: 111.111vh !important; min-height: 111.111dvh !important; }
  body.phoenix-cabinet.la2w-reference .page > aside#sidebar.app-sidebar {
    height: 111.111vh !important;
    height: 111.111dvh !important;
    max-height: 111.111dvh !important;
    background-color: #080e13 !important;
    background-image:
      linear-gradient(180deg, rgba(5,10,16,.68), rgba(5,10,16,.38) 60%, rgba(5,10,16,.21)),
      url('../la2world/reference/sidebar-scene.jpg') !important;
    background-position: center center, center center !important;
    background-size: cover, cover !important;
    background-repeat: no-repeat, no-repeat !important;
  }
  body.phoenix-cabinet.la2w-reference .page > aside#sidebar.app-sidebar #sidebar-scroll.main-sidebar {
    height: 100% !important;
    max-height: 100% !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}


/* LA2.WORLD 31.10: align balance, game transfer, language and profile
   to the established 40px language trigger, on desktop AND mobile.
   Keep hidden Sphere features hidden; do not change the header's row height. */
body.phoenix-cabinet.la2w-reference .header-content-right > .header-element.phoenix-balance-header,
body.phoenix-cabinet.la2w-reference .header-content-right > .header-element.enable_send_balance_game,
body.phoenix-cabinet.la2w-reference .header-content-right > .header-element.country-selector,
body.phoenix-cabinet.la2w-reference .header-content-right > .header-element.la2w-user-info {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  align-self: center !important;
  box-sizing: border-box !important;
}
body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-box {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  padding: 4px 7px !important;
  gap: 7px !important;
}
body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-topup {
  height: 29px !important;
  min-height: 29px !important;
  max-height: 29px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 9px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  gap: 4px;
  box-sizing: border-box !important;
}
body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-topup > i {margin: 0 !important;}
body.phoenix-cabinet.la2w-reference .header-content-right .enable_send_balance_game > .header-link {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: 0 10px !important;
  margin: 0 !important;
}
body.phoenix-cabinet.la2w-reference .header-content-right .country-selector .phoenix-cabinet-lang-trigger {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
body.phoenix-cabinet.la2w-reference .header-content-right .la2w-user-info > .header-link {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}
body.phoenix-cabinet.la2w-reference .la2w-profile-details {gap: 2px !important;}
/* On phones the top-up control contains ONLY the original circular-plus icon. */
@media (max-width: 991.98px) {
  body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-topup {
    width: 29px !important;
    min-width: 29px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border-radius: 6px;
  }
  body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-topup-text {display: none !important;}
  body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-topup > i {
    display: inline-block !important;
    font-size: 19px !important;
    line-height: 1 !important;
  }
  body.phoenix-cabinet.la2w-reference .header-content-right .phoenix-balance-box {gap: 5px !important;}
  body.phoenix-cabinet.la2w-reference .header-content-right .la2w-user-info > .header-link {
    padding-left: 5px !important;
    padding-right: 5px !important;
    min-width: 0 !important;
  }
}

/* LA2.WORLD 2026-10-31: only the two mobile buttons omitted by the prior 40px fix.
   Avoid using header's line-height/padding/min-width inherited from Sphere. */
@media (max-width: 991.98px) {
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-menu-slot,
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-server-slot {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-self: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-menu-slot > .sidemenu-toggle,
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-server-slot > .header-link {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(220,161,81,.45) !important;
    border-radius: 6px !important;
    background: linear-gradient(145deg,rgba(4,9,14,.9),rgba(16,12,11,.77)) !important;
  }
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-menu-slot > .sidemenu-toggle span {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 19px !important;
    height: 2px !important;
    margin: 0 !important;
    background: #f4e4c3 !important;
  }
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-menu-slot > .sidemenu-toggle span::before,
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-menu-slot > .sidemenu-toggle span::after {
    width: 19px !important;
    height: 2px !important;
    background: #f4e4c3 !important;
  }
  body.phoenix-cabinet.la2w-reference .app-header .la2w-mobile-server-slot > .header-link .header-link-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 20px !important;
    line-height: 20px !important;
    position: static !important;
  }
}
