/* ============================================
   ASSEMBLY.CSS — COGOP State Assembly Theme
   Extends Redshift shared.css with GOP branding
   ============================================ */

/* Import Redshift design system */
@import url('shared.css');

/* --- GOP Assembly brand overrides --- */
:root {
  --navy: #1B2A4A;
  --navy-light: #2A3F6B;
  --navy-dim: rgba(27, 42, 74, 0.12);
  --gold: #C5A55A;
  --gold-dim: rgba(197, 165, 90, 0.12);
  --white: #FFFFFF;
  /* Keep Redshift red — it works for GOP too */
}

/* Override dark theme for assembly */
[data-theme="dark"] {
  --bg-body: #080B12;
  --bg-card: #0E1320;
  --bg-card-alt: #121828;
  --border-dim: #1A2240;
  --border-mid: #253060;
}

/* Override light theme for assembly */
[data-theme="light"] {
  --bg-body: #F5F3EE;
  --bg-card: #FFFFFF;
  --bg-card-alt: #FAFAF6;
  --border-dim: #D4D0C8;
}

/* ============================================
   DISCLAIMER BAR
   ============================================ */
.disclaimer-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 4px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
}

/* ============================================
   ASSEMBLY HERO
   ============================================ */
.assembly-hero {
  padding: 40px 24px 32px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.assembly-hero .event-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.assembly-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 36px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 8px;
}

.assembly-hero .venue {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.assembly-hero .countdown {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 1px;
}

.assembly-hero .countdown.live {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ============================================
   PIN GATE MODAL
   ============================================ */
.pin-gate {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.pin-gate.hidden { display: none; }

.pin-box {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  padding: 40px 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
}

.pin-box h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pin-box .pin-subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.pin-input {
  width: 100%;
  padding: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 12px;
  text-align: center;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.pin-input:focus {
  border-color: var(--gold);
}

.pin-input.error {
  border-color: var(--red);
  animation: shake 0.3s ease;
}

.pin-submit {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.pin-submit:hover { background: var(--navy-light); }

.pin-error-msg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--red);
  margin-top: 12px;
  min-height: 14px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============================================
   NAV CARDS (Landing page quick nav)
   ============================================ */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 0 24px 32px;
  max-width: 600px;
  margin: 0 auto;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.nav-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.nav-card .card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.nav-card .card-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ============================================
   SECTION CONTAINERS
   ============================================ */
.section {
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}

.section-header {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dim);
}

/* ============================================
   AGENDA TIMELINE
   ============================================ */
.timeline { list-style: none; }

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dim);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  min-width: 70px;
  flex-shrink: 0;
}

.timeline-label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
}

.timeline-label strong {
  font-weight: 600;
}

.timeline-label small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-duration {
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

.timeline-responsible {
  color: var(--gold);
}

.timeline-location {
  color: var(--text-muted);
  font-style: italic;
}

.timeline-notes {
  color: var(--amber);
  font-family: 'IBM Plex Mono', monospace;
}

.timeline-item.break {
  background: rgba(34, 197, 94, 0.05);
  border-radius: 4px;
  padding: 12px 8px;
}

.timeline-item.vote {
  background: rgba(220, 38, 38, 0.05);
  border-radius: 4px;
  padding: 12px 8px;
}

/* ============================================
   CANDIDATE LIST
   ============================================ */
.candidate-list { list-style: none; }

.candidate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dim);
}

.candidate-item:last-child { border-bottom: none; }

.candidate-name {
  font-size: 14px;
  font-weight: 500;
}

.candidate-office {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.candidate-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy-light);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border-dim);
  transition: all 0.2s;
}

.candidate-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
  border-bottom: 1px solid var(--border-dim);
}

.faq-question {
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 0;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 14px;
}

/* ============================================
   CONTACT CARDS (Volunteer/Staff)
   ============================================ */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  padding: 16px;
  margin-bottom: 8px;
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.contact-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  transition: all 0.2s;
}

.contact-btn:hover { border-color: var(--gold); }

.contact-btn.call {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ============================================
   RADIO LEDGER (Staff)
   ============================================ */
.radio-grid {
  display: grid;
  gap: 8px;
}

.radio-row {
  display: grid;
  grid-template-columns: 50px 1fr 80px;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  gap: 12px;
}

.radio-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}

.radio-assignee {
  font-size: 13px;
  font-weight: 500;
}

.radio-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

.radio-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px;
  text-align: center;
}

.radio-status.available { color: var(--green); border: 1px solid var(--green); background: var(--green-dim); }
.radio-status.checked-out { color: var(--amber); border: 1px solid var(--amber); background: var(--amber-dim); }
.radio-status.returned { color: var(--text-muted); border: 1px solid var(--border-dim); }

.radio-summary {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-dim);
  margin-bottom: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.radio-summary .count {
  font-weight: 700;
  color: var(--gold);
}

/* ============================================
   PERSONS CAROUSEL (Staff — stub)
   ============================================ */
.person-carousel {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.person-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}

.person-status-bar {
  padding: 6px 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--white);
}

.person-status-bar.deny { background: var(--red); }
.person-status-bar.monitor { background: var(--amber); color: #000; }
.person-status-bar.vip { background: var(--green); color: #000; }

.person-body {
  padding: 24px;
  text-align: center;
}

.person-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-input);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
  overflow: hidden;
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.person-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.person-notes {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
  padding: 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-dim);
}

.person-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.person-nav button {
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.person-nav button:hover { border-color: var(--gold); }

.person-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.person-filter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.person-filter.active {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================
   TIER BADGES
   ============================================ */
.tier-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.tier-badge:hover { opacity: 0.8; }

.tier-badge.public { color: var(--text-muted); border: 1px solid var(--border-dim); }
.tier-badge.attendee { color: var(--blue); border: 1px solid rgba(37, 99, 235, 0.3); background: var(--blue-dim); }
.tier-badge.volunteer { color: var(--gold); border: 1px solid rgba(197, 165, 90, 0.3); background: var(--gold-dim); }
.tier-badge.staff { color: var(--red); border: 1px solid rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.08); }

/* Tier switcher dropdown */
.tier-switcher {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: none;
  min-width: 120px;
}

.tier-switcher.open { display: block; }

.tier-switcher-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tier-switcher-item:hover { background: var(--bg-card-alt); }
.tier-switcher-item.active { color: var(--red); }
.tier-switcher-item.t-public { border-left: 3px solid var(--gray); }
.tier-switcher-item.t-attendee { border-left: 3px solid var(--blue); }
.tier-switcher-item.t-volunteer { border-left: 3px solid var(--gold); }
.tier-switcher-item.t-staff { border-left: 3px solid var(--red); }

/* Map selector tabs */
.map-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.map-tabs::-webkit-scrollbar { display: none; }

.map-tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.map-tab:hover { border-color: var(--gold); color: var(--text-primary); }
.map-tab.active { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

/* County zone overlay labels */
.county-zone-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(255,255,255,0.85);
  padding: 2px 6px;
  border: 1px solid var(--navy);
  white-space: nowrap;
}

[data-theme="dark"] .county-zone-label {
  color: var(--gold);
  background: rgba(14, 19, 32, 0.85);
  border-color: var(--gold);
}

/* ============================================
   VENUE MAP
   ============================================ */
.map-container {
  position: relative;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 70vh;
  border: 1px solid var(--border-dim);
}

.map-container img {
  width: 100%;
  min-width: 600px;
  display: block;
}

/* ============================================
   BOTTOM NAV — Persistent mobile navigation
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--bg-card);
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-around;
  padding: 4px 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 6px 8px;
  min-width: 56px;
  gap: 2px;
  transition: color 0.2s;
}

.bottom-nav-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}

.bottom-nav-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.bottom-nav a.active .bottom-nav-icon,
.bottom-nav a.active .bottom-nav-label {
  color: var(--red);
}

.bottom-nav a:hover .bottom-nav-icon,
.bottom-nav a:hover .bottom-nav-label {
  color: var(--text-primary);
}

/* Staff-only nav items hidden by default */
.bottom-nav [data-min-tier] {
  display: none;
}

/* Add bottom padding to body so content isn't hidden behind nav */
body.has-bottom-nav {
  padding-bottom: 64px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .assembly-hero h1 { font-size: 28px; }
  .nav-cards { grid-template-columns: repeat(2, 1fr); }
  .radio-row { grid-template-columns: 40px 1fr 70px; }
}

/* Hide top nav links on mobile — bottom nav replaces them */
@media (max-width: 768px) {
  .nav-right .nav-link { display: none; }
  .nav-bar { padding: 10px 16px; }
}
