/* ============================================================
   TribeCity Modern UI — Mobile Menu
   Dedicated stylesheet for the slide-in mobile side menu.
   Markup lives in: views/templates/header/sidebarMobile.tpl
   Loaded by:       views/templates/layouts/head.tpl (admin layout only)

   Kept separate from tribecity-modern.css so the rest of the
   design system stays focused on reusable, cross-page primitives.
   ============================================================ */

/* Tokens — tweak the whole menu from one place */
:root {
  --tc-mm-bg:           #10121a;
  --tc-mm-fg:           #e7e8ec;
  --tc-mm-fg-muted:     #9aa0ab;
  --tc-mm-surface:      rgba(255, 255, 255, 0.04);
  --tc-mm-surface-hov:  rgba(255, 255, 255, 0.09);
  --tc-mm-border:       rgba(255, 255, 255, 0.08);
  --tc-mm-divider:      rgba(255, 255, 255, 0.08);
  --tc-mm-overlay:      rgba(5, 6, 10, 0.55);
  --tc-mm-radius:       10px;
  --tc-mm-width:        85%;
  --tc-mm-max-width:    340px;
  --tc-mm-padding:      18px 14px;
  --tc-mm-gap:          10px;
  --tc-mm-ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --tc-mm-speed:        0.28s;
  --tc-mm-item-pad:     10px 14px;
  --tc-mm-item-font:    13px;
  --tc-mm-icon-size:    24px;
  --tc-mm-logout-fg:    #9aa0ab;
  --tc-mm-logout-fg-hov:#e7e8ec;
  --tc-mm-accent:       var(--tc-brand, #e8a66d);
  --tc-mm-active-bg:    rgba(232, 166, 109, 0.12);
}

/* Root — wraps toggle + overlay + panel */
.tc-mobile-menu { position: relative; }

/* Hamburger toggle button */
.tc-mobile-menu-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  border-radius: var(--tc-mm-radius);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.tc-mobile-menu-toggle:active { transform: scale(0.96); }
.tc-mobile-menu-toggle svg,
.tc-mobile-menu-toggle img { width: auto; height: 26px; object-fit: contain; }
.tc-mobile-menu-toggle span {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: #fff;
}
.tc-mobile-menu-toggle .totalNotificationCount {
  position: absolute; top: 0; right: -2px;
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; font-size: 10px;
}

/* Dimmed backdrop */
.tc-mobile-menu-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100vh;
  background: var(--tc-mm-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity var(--tc-mm-speed) ease-in-out;
}

/* Slide-in panel */
.tc-mobile-menu-panel {
  position: fixed; top: 0; left: calc(-1 * var(--tc-mm-width));
  width: var(--tc-mm-width);
  max-width: var(--tc-mm-max-width);
  height: 100vh;
  padding: var(--tc-mm-padding);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--tc-mm-gap);
  background: var(--tc-mm-bg);
  color: var(--tc-mm-fg);
  border-right: 1px solid var(--tc-mm-border);
  box-shadow: 8px 0 32px rgba(0,0,0,0.5);
  overflow-y: auto;
  z-index: 1000;
  transition: left var(--tc-mm-speed) var(--tc-mm-ease);
}

/* Active state */
.tc-mobile-menu.active .tc-mobile-menu-panel { left: 0; }
.tc-mobile-menu.active .tc-mobile-menu-overlay { display: block; opacity: 1; }

/* Close (X) button — top-right of the panel */
.tc-mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  z-index: 2;
}
.tc-mobile-menu-close:focus-visible {
  background: transparent;
  color: #fff;
}
.tc-mobile-menu-close:active { transform: scale(0.94); }
.tc-mobile-menu-close svg { width: 18px; height: 18px; display: block; }

/* Divider */
.tc-mobile-menu-divider {
  margin: 2px 0;
  height: 1px;
  background: var(--tc-mm-divider);
  border: 0;
}

/* Coins pill — don't stretch to full width inside the column */
.tc-mobile-menu-panel .coins-display {
  align-self: flex-start;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  box-shadow: none;
  margin-left: 0px;
}
.tc-mobile-menu-panel .coins-display .coin-icon { height: 16px; width: 16px; }



/* Tribe selector tweak for dark bg */
.tc-mobile-menu-panel .tribe-selector .currentTribe .dropdown-toggle {
  background-color: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

/* Nav — wraps the shared header/navigation.tpl .panel-navigation.
   Styles below flatten the desktop pills into single dark rows. */
.tc-mobile-menu-nav .panel-navigation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tc-mobile-menu-nav .panel-navigation .nav-link,
.tc-mobile-menu-nav .panel-navigation .nav-link-custom {
  position: relative;
  font-family: poppins !important;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: light !important;
  padding: 12px !important;
  background: #ffffff05;
  width: 100%;
  border-radius: 5px;
  color: var(--tc-mm-fg);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.tribe-selector-mobile {
  padding: 0px;
}

.tc-mobile-menu-nav .panel-navigation .nav-link:focus-visible,
.tc-mobile-menu-nav .panel-navigation .nav-link-custom:focus-visible {
  background: var(--tc-mm-surface-hov);
  color: #fff;
  text-decoration: none;
}
/* Active/current page indicator */
.tc-mobile-menu-nav .panel-navigation .nav-link.active,
.tc-mobile-menu-nav .panel-navigation .nav-link-custom.active {
  background: var(--tc-mm-active-bg);
  color: #fff;
}
.tc-mobile-menu-nav .panel-navigation .nav-link.active::before,
.tc-mobile-menu-nav .panel-navigation .nav-link-custom.active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--tc-mm-accent);
  border-radius: 0 3px 3px 0;
}
.tc-mobile-menu-nav .panel-navigation .nav-link.active .nav-item.nav-custom img {
  opacity: 1;
}
.tc-mobile-menu-nav .panel-navigation .nav-link.active .nav-text,
.tc-mobile-menu-nav .panel-navigation .nav-link.active .btn,
.tc-mobile-menu-nav .panel-navigation .nav-link-custom.active .btn {
  color: #fff !important;
}
/* Kill the desktop pill button styling inside the dark menu */
.tc-mobile-menu-nav .panel-navigation .btn {
  flex: 1;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: inherit !important;
  font-size: var(--tc-mm-item-font);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}
/* Flatten the icon wrapper */
.tc-mobile-menu-nav .panel-navigation .nav-item.nav-custom {
  display: none;
}
.tc-mobile-menu-nav .panel-navigation .nav-item.nav-custom img {
  width: var(--tc-mm-icon-size);
  height: var(--tc-mm-icon-size);
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.tc-mobile-menu-nav .panel-navigation .nav-text {
  flex: 1; margin: 0;
  color: inherit;
  font-size: var(--tc-mm-item-font);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Hide the empty responsive-only badge placeholder; keep real ones */
.tc-mobile-menu-nav .panel-navigation .nav-link > .totalNotificationCount.hide-tablet.hide-desktop {
  display: none;
}
.tc-mobile-menu-nav .panel-navigation .totalNotificationCount {
  position: static;
  margin-left: auto;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
}

/* Help — sits above logout, pushed to bottom via margin-top:auto */
.tc-mobile-menu-help {
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  opacity: 0.8;
}
.tc-mobile-menu-help a,
.tc-mobile-menu-help a:focus-visible {
  color: var(--tc-mm-fg-muted);
  text-decoration: none;
  font-size: 12px;
}

/* Logout — flat gray row with icon, anchored at bottom */
.tc-mobile-menu-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--tc-mm-surface);
  border-radius: 5px;
  color: var(--tc-mm-logout-fg);
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tc-mobile-menu-logout i { font-size: 14px; }
.tc-mobile-menu-logout:focus-visible {
  background: var(--tc-mm-surface-hov);
  color: var(--tc-mm-logout-fg-hov);
  text-decoration: none;
}
