/* AirFare Sentinel Design System */
:root {
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --card-border-radius: 1.25rem; /* rounded-4 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden !important;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: #1e293b;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Container breathing room */
.app-container {
  padding-left: clamp(0.75rem, 2.5vw, 2rem);
  padding-right: clamp(0.75rem, 2.5vw, 2rem);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Header Navbar */
.app-navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Rounded Cards */
.rounded-4 {
  border-radius: var(--card-border-radius) !important;
}

.card-pastel-blue {
  background-color: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.card-pastel-green {
  background-color: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
}

.card-pastel-amber {
  background-color: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.card-pastel-purple {
  background-color: rgba(147, 51, 234, 0.07);
  border: 1px solid rgba(147, 51, 234, 0.16);
}

.card-pastel-rose {
  background-color: rgba(225, 29, 72, 0.07);
  border: 1px solid rgba(225, 29, 72, 0.16);
}

/* Form Controls */
.form-control, .form-select {
  border-radius: 0.65rem;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 0.85rem;
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Badges */
.badge-price-drop {
  background-color: #fee2e2;
  color: #dc2626;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
}

.badge-target-met {
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
}

.badge-monitoring {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
}

/* Custom Interactive Flight Card */
.flight-tracker-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background: #ffffff;
  border: 3.5px solid #e2e8f0;
  cursor: pointer;
  position: relative;
}

.flight-tracker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  border-color: #94a3b8;
}

.flight-tracker-card.active-selected-card {
  border: 3.5px solid #0d6efd !important;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35), 0 12px 28px -4px rgba(13, 110, 253, 0.25) !important;
  background-color: #f0f7ff !important;
}

/* Price Big Typography */
.price-tag {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Pulsing radar dot */
.radar-pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.7);
  animation: radar-pulse-anim 1.8s infinite;
}

@keyframes radar-pulse-anim {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Install PWA Banner */
.install-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
}

/* Glassmorphism modal */
.modal-content {
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.cursor-pointer {
  cursor: pointer;
}

.filter-card-option {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  position: relative;
  padding-left: 0.85rem !important;
}

.filter-card-option .form-check-input {
  margin-left: 0 !important;
  margin-right: 0.65rem !important;
  margin-top: 0.2rem !important;
  float: none !important;
}

.filter-card-option:hover {
  background-color: #f8fafc !important;
  border-color: #93c5fd !important;
}

.filter-card-option:has(.form-check-input:checked) {
  border-color: #2563eb !important;
  background-color: #eff6ff !important;
  box-shadow: 0 0 0 1px #2563eb !important;
}

/* ==========================================================================
   Multi-page Tabs & Navigation System
   ========================================================================== */

/* Tab Page Visibility & Animation */
.tab-page {
  animation: tabFadeIn 0.22s ease-out;
  min-height: 50vh;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop Navigation Tab Pills */
.desktop-nav-tabs .nav-tab-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.desktop-nav-tabs .nav-tab-btn:hover {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.08);
}

.desktop-nav-tabs .nav-tab-btn.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Mobile Bottom Navigation Bar (iOS / Android Native PWA Style) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1030;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px 0 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.mobile-nav-item.active {
  color: #2563eb;
}

.mobile-nav-item.active i {
  transform: scale(1.15);
}

/* Add padding to the bottom of the body on mobile so content is not obscured by the bottom bar */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Page Indicator Dots */
.page-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cbd5e1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.page-dot.active {
  width: 22px;
  border-radius: 11px;
  background-color: #2563eb;
}

/* Tracker SubTabs */
.tracker-subtab-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.tracker-subtab-btn.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.active-view-btn {
  border-color: #2563eb !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* Horizontal Route Pills in Paginated View */
.tracker-route-pill {
  white-space: nowrap;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background-color: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tracker-route-pill:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background-color: #f8fafc;
}

.tracker-route-pill.active {
  border-color: #2563eb !important;
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
}

