/* ═══════════════════════════════════════════════════════════════════
   MY LUCKY LAUNDRY — Native Bottom Tab Bar
   Stack: persisted on all pages, gold/forest design
   ═══════════════════════════════════════════════════════════════════ */

/* ── Body padding so content isn't hidden behind the nav ── */
html.has-bottom-nav body {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ── On mobile: hide the top nav, let bottom tabs handle navigation ── */
@media (max-width: 767px) {
  html.has-bottom-nav nav:not(#mll-bottom-nav) {
    display: none !important;
  }
  /* Remove sticky-nav top space; account for device safe area (notch) */
  html.has-bottom-nav body {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* Desktop: hide bottom nav entirely, restore normal nav */
@media (min-width: 768px) {
  #mll-bottom-nav,
  #mll-more-panel {
    display: none !important;
  }
  html.has-bottom-nav body {
    padding-bottom: 0 !important;
  }
}

/* ══ BOTTOM NAV CONTAINER ══════════════════════════════════════════ */
#mll-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: stretch;
  background: #122b18;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left:  env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  border-top: 1px solid rgba(244, 196, 48, 0.18);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.45), 0 -1px 0 rgba(244, 196, 48, 0.08);
}

/* ══ INDIVIDUAL TAB ════════════════════════════════════════════════ */
.mll-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.38);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* ripple on press */
.mll-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(244, 196, 48, 0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.15s;
}

.mll-tab:active::before {
  opacity: 1;
}

/* active state */
.mll-tab.active {
  color: #F4C430;
}

/* top indicator line */
.mll-tab::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 2px;
  background: #F4C430;
  border-radius: 0 0 3px 3px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mll-tab.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ── Tab Icon ── */
.mll-tab-icon {
  width: 23px;
  height: 23px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.mll-tab.active .mll-tab-icon {
  transform: scale(1.12) translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(244, 196, 48, 0.55));
}

/* ── Tab Label ── */
.mll-tab-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1;
  transition: color 0.2s;
}

/* ══ MORE PANEL ════════════════════════════════════════════════════ */
#mll-more-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
}

#mll-more-panel.open {
  display: block;
}

.mll-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: mllFadeIn 0.22s ease;
}

.mll-more-sheet {
  position: absolute;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: #122b18;
  border-radius: 20px 20px 0 0;
  padding: 10px 0 24px;
  border-top: 1px solid rgba(244, 196, 48, 0.25);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  animation: mllSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mll-more-panel.closing .mll-more-overlay {
  animation: mllFadeOut 0.2s ease forwards;
}

#mll-more-panel.closing .mll-more-sheet {
  animation: mllSlideDown 0.2s ease forwards;
}

/* drag handle */
.mll-more-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* section title */
.mll-more-title {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 20px 10px;
  border-bottom: 1px solid rgba(244, 196, 48, 0.1);
  margin-bottom: 4px;
}

/* link rows */
.mll-more-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mll-more-link:active {
  background: rgba(244, 196, 48, 0.08);
  color: #F4C430;
}

.mll-more-link-icon {
  font-size: 19px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.mll-more-link-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.1px;
}

.mll-more-chevron {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

/* ── Animations ── */
@keyframes mllFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes mllFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes mllSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes mllSlideDown {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}
