/* ============================================
   dashboard.css
   ============================================ */

/* Shared intro text below section headings */
.section-intro {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ── 1. COUNTDOWN ───────────────────────────── */
.countdown-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #4a5fcc 100%);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
  border: none;
}

.countdown-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  margin-bottom: 1rem;
  font-weight: 600;
}

.countdown-blocks {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.countdown-block {
  text-align: center;
  min-width: 72px;
}

.countdown-number {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 0.3em 0.4em;
  display: inline-block;
  min-width: 1.8em;
}

.countdown-unit {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-top: 0.4rem;
  font-weight: 600;
}

.countdown-sep {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 300;
  opacity: 0.5;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.countdown-sub {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ── 2. ALERTS ──────────────────────────────── */
.alerts-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fcd34d;
}

.alert-info {
  background: #eff6ff;
  border-color: #93c5fd;
}

.alert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.alert-body {
  flex: 1;
}

.alert-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
  color: var(--color-text-main);
}

.alert-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.alert-btn {
  flex-shrink: 0;
  align-self: center;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--color-primary);
  color: white;
  transition: opacity 0.2s;
}

.alert-btn:hover {
  opacity: 0.85;
}

/* ── 3. STATS ───────────────────────────────── */
.stats-section {
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stat-item {
  text-align: center;
  padding: 0.5rem 0.75rem;
  flex: 1;
  min-width: 100px;
}

.stat-number {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ── 4. TIMELINE ────────────────────────────── */
.timeline-scroll-wrap {
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-top: 1rem;
  /* subtle scroll hint on small screens */
  -webkit-overflow-scrolling: touch;
}

.timeline {
  display: flex;
  align-items: center;
  min-width: 900px;
  padding: 1rem 0.5rem;
  gap: 0;
}

/* Connecting lines */
.timeline-line {
  flex: 1;
  height: 4px;
  min-width: 20px;
}

.line-vn   { background: linear-gradient(90deg, #667eea, #667eea); }
.line-la   { background: linear-gradient(90deg, #ea9966, #ea9966); }
.line-border {
  background: linear-gradient(90deg, #667eea, #ea9966);
  height: 4px;
}

/* Nodes */
.timeline-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.node-vn       { background: var(--color-primary); }
.node-la       { background: var(--color-secondary); }
.node-departure { background: var(--color-navigation); }

.node-icon { line-height: 1; }

/* Stop cards */
.timeline-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.timeline-stop-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.6rem;
  text-align: center;
  min-width: 120px;
  max-width: 140px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.stop-country {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.stop-city {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-text-main);
  margin-bottom: 0.2rem;
}

.stop-dates {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-stop:has(.node-la) .stop-dates {
  color: var(--color-secondary);
}

.stop-highlights {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Departure / arrival legs */
.timeline-leg {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.timeline-leg-label {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
	
	background: white;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  min-width: 150px;
  max-width: 150px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.timeline-leg-label strong {
  font-size: 0.8rem;
  color: var(--color-text-main);
}

/* Border marker */
.timeline-border-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 0 0.5rem;
}

.border-marker-flag {
  font-size: 0.9rem;
  white-space: nowrap;
}

.border-marker-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
  margin-top: 0.2rem;
  max-width: 90px;
}

/* ── 5. PARTICIPANTS ────────────────────────── */
.groups-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.group-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.group-header-fr {
  background: #dbeafe;
  border-bottom: 1px solid #bfdbfe;
}

.group-header-ph {
  background: #f3e8ff;
  border-bottom: 1px solid #e9d5ff;
}

.group-flag {
  font-size: 1.8rem;
}

.group-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-main);
}

.group-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.group-chips {
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: white;
}

/* Make chips a bit more compact inside the group card */
.group-chips .chip {
  margin: 0;
}

.group-visa-note {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  color: #92400e;
  background: #fffbeb;
  border-top: 1px solid #92400e;
  font-weight: 500;
}

.visa-free {
  background: #d4edda;
  color: #155724;
	border-top: 1px solid #155724;
}

/* ── 6. NAVIGATION CARDS ────────────────────── */
.nav-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  background: white;
  color: var(--color-text-main);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.nav-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.18);
  transform: translateY(-2px);
  color: var(--color-text-main);
}

.nav-card-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}

.nav-card-body {
  flex: 1;
}

.nav-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.nav-card-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.nav-card-arrow {
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}

.nav-card:hover .nav-card-arrow {
  color: var(--color-primary);
  transform: translateX(3px);
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 600px) {
  .countdown-section {
    padding: 1.5rem 1rem;
  }

  .countdown-sep {
    font-size: 1.5rem;
  }

  .stats-grid {
    gap: 0.25rem;
  }

  .stat-divider {
    display: none;
  }

  .stat-item {
    min-width: 100px;
  }

  .alert {
    flex-wrap: wrap;
  }

  .alert-btn {
    align-self: flex-start;
    margin-left: calc(1.4rem + 1rem); /* align with text */
  }

  .nav-cards-grid {
    grid-template-columns: 1fr;
  }
}
