/* Bottom tab bar — PWA mobile (views/partials/limelight-nav.ejs)
 *
 * Tokens --mr-f1-*: public/css/tokens.css (Fase 1 paleta global).
 * Este partial incluye tokens.css antes que este archivo.
 */
.mr-bottom-nav-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  max-width: var(--pwa-nav-max-width, 480px);
  margin: 0 auto;
  padding: 0 var(--pwa-nav-px, 14px) var(--pwa-nav-pb, calc(12px + env(safe-area-inset-bottom, 0px)));
  pointer-events: none;
  font-family: 'DM Sans', 'Inter', -apple-system, sans-serif;
}

.mr-bottom-nav {
  pointer-events: all;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--pwa-nav-br, 28px);
  background: var(--pwa-nav-bg, linear-gradient(180deg, #1a1d2e 0%, #10152f 55%, #0a0f24 100%));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mr-bottom-nav__tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--pwa-nav-height, 54px);
  padding: 6px 4px;
  border: 0;
  border-radius: var(--pwa-nav-tab-br, 20px);
  background: transparent;
  text-decoration: none;
  color: rgba(186, 194, 225, 0.72);
  font-size: var(--pwa-nav-label-size, 9px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.mr-bottom-nav__tab i {
  font-size: var(--pwa-nav-icon-size, 20px);
  line-height: 1;
}

.mr-bottom-nav__tab:active {
  transform: scale(0.96);
}

/* Activo: pill con degradado horizontal + brillo (misma familia que drawer .is-active) */
.mr-bottom-nav__tab.is-active {
  color: #fff;
  background: linear-gradient(
    90deg,
    var(--mr-f1-pill-a) 0%,
    var(--mr-f1-pill-c) 38%,
    var(--mr-f1-pill-d) 72%,
    var(--mr-f1-pill-e) 100%
  );
  box-shadow:
    0 4px 20px var(--mr-f1-glow),
    inset 0 1px 0 var(--mr-f1-shine-strong),
    inset 0 -2px 5px var(--mr-f1-depth);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.mr-bottom-nav__tab.is-active i {
  color: #fff;
}

.mr-bottom-nav-spacer {
  height: var(--pwa-nav-spacer, calc(88px + env(safe-area-inset-bottom, 0px)));
  flex-shrink: 0;
}

/* —— Mobile menu drawer (bottom sheet desde abajo) —— */
.mr-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(5, 8, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mr-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mr-menu-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1090;
  margin: 0 auto;
  width: 100%;
  max-width: var(--pwa-nav-max-width, 480px);
  max-height: min(88dvh, calc(100dvh - 24px));
  background: var(--pwa-drawer-bg, #1a1a2e);
  color: #eef2ff;
  display: flex;
  flex-direction: column;
  border-radius: var(--pwa-drawer-br, 24px 24px 0 0);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
  font-family: 'DM Sans', 'Inter', -apple-system, sans-serif;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.mr-menu-drawer.is-open {
  transform: translateY(0);
}

.mr-menu-drawer__handle {
  flex-shrink: 0;
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
}

.mr-menu-drawer__handle::after {
  content: '';
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}

.mr-menu-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 4px 20px 12px;
}

.mr-menu-drawer__title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.mr-menu-drawer__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}

.mr-menu-drawer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.mr-menu-section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(139, 143, 173, 0.9);
  margin: 20px 0 10px 4px;
}

.mr-menu-section:first-child {
  margin-top: 8px;
}

/* Filas tipo “pill” glass (Fase 1): volumen + degradado suave en todos los ítems */
.mr-menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 8px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  text-align: left;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(0, 0, 0, 0.14) 100%
  );
  box-shadow:
    inset 0 1px 0 var(--mr-f1-shine-soft),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mr-menu-link > i:first-child {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.mr-menu-link span {
  flex: 1;
}

.mr-menu-link:active:not(.is-active) {
  transform: scale(0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Seleccionada: mismo brillo que referencia “Ventas” (degradado horizontal + filo + reflejo) */
.mr-menu-link.is-active {
  color: #fff;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(
    90deg,
    var(--mr-f1-pill-a) 0%,
    var(--mr-f1-pill-c) 34%,
    var(--mr-f1-pill-d) 68%,
    var(--mr-f1-pill-e) 100%
  );
  box-shadow:
    0 6px 22px var(--mr-f1-glow),
    inset 0 1px 0 var(--mr-f1-shine-strong),
    inset 0 -3px 8px var(--mr-f1-depth);
}

.mr-menu-link.is-active > i:first-child {
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* Highlight vertical tipo “gloss” en el borde izquierdo */
.mr-menu-link.is-active::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 14%;
  bottom: 14%;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.35) 45%,
    rgba(255, 255, 255, 0.08) 100%
  );
  opacity: 0.65;
  pointer-events: none;
  box-shadow: 2px 0 6px rgba(255, 255, 255, 0.2);
}

/* Filo luminoso superior (rim light) */
.mr-menu-link.is-active::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 10%;
  top: 2px;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--mr-f1-rim) 22%,
    rgba(255, 255, 255, 0.35) 50%,
    var(--mr-f1-rim) 78%,
    transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
}

.mr-menu-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.mr-menu-open {
  overflow: hidden;
}

@media (min-width: 992px) {
  .mr-bottom-nav-wrap,
  .mr-bottom-nav-spacer,
  .mr-menu-overlay,
  .mr-menu-drawer {
    display: none !important;
  }
}
