/* coi_nav.css — Top Nav Bar Styles
   Session: J3-C4-COI-041 · 2026-04-09
   Cursor-reveal nav bar — white/gate aesthetic
   ═══════════════════════════════════════════════════════════════ */

/* ── NAV BAR CONTAINER ─────────────────────────────────────── */
#coi-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90000;
  height: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  font-family: 'Cinzel', serif;
}
#coi-nav.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── NAV ITEMS ─────────────────────────────────────────────── */
.coi-nav-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.coi-nav-btn:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}
.coi-nav-btn .nav-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* ── SETTINGS DROPDOWN ─────────────────────────────────────── */
#coi-nav-settings-panel {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90001;
  background: rgba(8,2,12,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  min-width: 260px;
  display: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#coi-nav-settings-panel.open {
  display: block;
}

/* ── STATS DROPDOWN ────────────────────────────────────────── */
#coi-nav-stats-panel {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90001;
  background: rgba(8,2,12,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  min-width: 280px;
  display: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#coi-nav-stats-panel.open {
  display: block;
}

/* ── REDEEM DROPDOWN ───────────────────────────────────────── */
#coi-nav-redeem-panel {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90001;
  background: rgba(8,2,12,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  min-width: 300px;
  display: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#coi-nav-redeem-panel.open {
  display: block;
}

/* ── SHARED PANEL STYLES ───────────────────────────────────── */
.coi-nav-panel-title {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}

/* Setting rows */
.coi-nav-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.coi-nav-setting-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
}
.coi-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 8px 0;
}

/* Toggle switch */
.coi-nav-toggle {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.coi-nav-toggle input {
  display: none;
}
.coi-nav-toggle-track {
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
  transition: background 0.3s, border-color 0.3s;
}
.coi-nav-toggle input:checked + .coi-nav-toggle-track {
  background: rgba(255,215,0,0.15);
  border-color: rgba(255,215,0,0.3);
}
.coi-nav-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: transform 0.3s, background 0.3s;
  pointer-events: none;
}
.coi-nav-toggle input:checked ~ .coi-nav-toggle-thumb {
  transform: translateX(16px);
  background: rgba(255,215,0,0.7);
}

/* Slider */
.coi-nav-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  outline: none;
  cursor: pointer;
}
.coi-nav-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
}
.coi-nav-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
}

/* Stats rows */
.coi-nav-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
}
.coi-nav-stat-label {
  color: rgba(255,255,255,0.35);
}
.coi-nav-stat-value {
  color: rgba(255,255,255,0.6);
  font-family: 'Courier Prime', monospace;
  font-size: 0.8rem;
}

/* Redeem input */
.coi-nav-redeem-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.3s;
}
.coi-nav-redeem-input:focus {
  border-color: rgba(255,215,0,0.3);
}
.coi-nav-redeem-input::placeholder {
  color: rgba(255,255,255,0.15);
  text-transform: none;
}
.coi-nav-redeem-btn {
  width: 100%;
  padding: 8px;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.15);
  color: rgba(255,215,0,0.5);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}
.coi-nav-redeem-btn:hover {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.3);
  color: rgba(255,215,0,0.8);
}
.coi-nav-redeem-msg {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 8px;
  min-height: 1.2em;
}

/* ── MOBILE NAV TOGGLE BUTTON ──────────────────────────────── */
#coi-nav-toggle {
  display: none; /* hidden on desktop */
}
@media (max-width: 767px) {
  #coi-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 90002;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, opacity 0.4s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  #coi-nav-toggle:active {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
  }
  #coi-nav-toggle svg {
    width: 16px;
    height: 16px;
    opacity: 0.4;
    transition: opacity 0.3s;
  }
  #coi-nav-toggle.nav-open svg {
    opacity: 0.7;
  }
  #coi-nav-toggle.nav-open {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
  }
}

/* ── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 767px) {
  #coi-nav {
    height: 42px;
    gap: 3px;
    padding: 0 8px;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .coi-nav-btn {
    font-size: 0.5rem;
    padding: 5px 8px;
    gap: 4px;
  }
  .coi-nav-btn .nav-label {
    display: none;
  }
  .coi-nav-btn .nav-icon {
    font-size: 1rem;
  }
  #coi-nav-settings-panel,
  #coi-nav-stats-panel,
  #coi-nav-redeem-panel {
    left: 4px;
    right: 4px;
    transform: none;
    min-width: 0;
  }
}
