/* =============================================
   JAPAN 2026 — Component Styles
   Reusable UI components
   ============================================= */

/* ---- Glass Card ---- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ---- Button ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-weight: var(--fw-semibold); font-size: var(--fs-small);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-transform: uppercase; letter-spacing: 0.08em;
  position: relative; overflow: hidden;
}
.btn--primary {
  background: var(--gradient-primary); color: white;
  box-shadow: var(--shadow-glow-primary);
}
.btn--primary:hover {
  transform: translateY(-2px); box-shadow: 0 0 40px rgba(230,57,70,0.5);
}
.btn--outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn--outline:hover {
  background: var(--glass-bg); border-color: var(--primary-light);
  color: var(--primary-light);
}
.btn--accent {
  background: var(--gradient-accent); color: white;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge--primary { background: rgba(230,57,70,0.15); color: var(--primary-light); }
.badge--accent { background: rgba(244,162,97,0.15); color: var(--accent); }
.badge--teal { background: rgba(46,196,182,0.15); color: var(--accent-teal); }

/* ---- Tag ---- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

/* ---- Icon Circle ---- */
.icon-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ===== DAY DETAIL MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: var(--space-md);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  border: 1px solid var(--glass-border);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.modal-close:hover {
  background: var(--primary-color);
}
.modal-hero-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.modal-header {
  padding: var(--space-xl) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border-color);
}
.modal-title {
  font-size: var(--fs-h2);
  margin: var(--space-xs) 0;
  color: var(--text-light);
}
.modal-schedule {
  padding: var(--space-lg);
}
.modal-schedule-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.modal-schedule-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.modal-schedule-time {
  color: var(--primary-color);
  font-family: var(--font-mono);
  font-weight: 500;
  min-width: 60px;
}
.modal-schedule-text {
  color: var(--text-secondary);
}

/* ===== BULLET TRAIN ANIMATION ===== */
.route-train {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  z-index: 10;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .route-train {
    top: auto;
    bottom: -20px;
    right: 50%;
    transform: translateX(50%) rotate(90deg);
  }
}

/* ---- Progress Bar ---- */
.progress-bar {
  width: 100%; height: 6px;
  background: var(--glass-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Tooltip ---- */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute; bottom: 120%; left: 50%;
  transform: translateX(-50%) scale(0.9);
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--bg-dark-3); color: var(--text-primary);
  font-size: var(--fs-xs); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: all var(--transition-fast);
}
.tooltip:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---- Checkbox (Custom) ---- */
.custom-checkbox {
  display: flex; align-items: center; gap: var(--space-sm);
  cursor: pointer; padding: var(--space-sm) 0;
  transition: opacity var(--transition-fast);
}
.custom-checkbox input { display: none; }
.custom-checkbox .checkmark {
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.custom-checkbox input:checked + .checkmark {
  background: var(--gradient-primary);
  border-color: var(--primary);
}
.custom-checkbox input:checked + .checkmark::after {
  content: '✓'; color: white; font-size: 14px; font-weight: bold;
}
.custom-checkbox input:checked ~ .check-label {
  text-decoration: line-through; opacity: 0.5;
}
.check-label { font-size: var(--fs-body); color: var(--text-secondary); }

/* ---- Tab Switcher ---- */
.tab-switcher {
  display: inline-flex;
  background: var(--glass-bg);
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  padding: 4px;
  gap: 4px;
}
.tab-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ---- Option Card (for Cost Calculator) ---- */
.option-card {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}
.option-card:hover {
  border-color: var(--primary-light);
  background: var(--glass-bg-hover);
}
.option-card.selected {
  border-color: var(--primary);
  background: rgba(230,57,70,0.08);
  box-shadow: var(--shadow-glow-primary);
}
.option-card.selected::after {
  content: '✓';
  position: absolute; top: 12px; right: 12px;
  width: 24px; height: 24px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: bold;
}
.option-card__title {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.option-card__price {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--accent);
}
.option-card__desc {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}
