/* ─── UI Enhancements — Light Theme ────────────────────────── */

/* ─── Loading Overlay ────────────────────────────────────────── */
#flight-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#flight-loading.active { display: flex; }

/* Background image with subtle breathe animation */
.loader-bg {
  position: absolute;
  inset: 0;
  background: url('../img/loading-bg.png') center center / cover no-repeat;
  animation: loaderBreathe 8s ease-in-out infinite;
}
.loader-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(248, 249, 252, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@keyframes loaderBreathe {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.05); }
}

/* Glassmorphic card */
.loader-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
  padding: 48px 56px 44px;
  min-width: 320px;
  max-width: 420px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Plane icon + pulsing ring */
.loader-icon-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.loader-plane-icon {
  font-size: 42px !important;
  color: #EF6603;
  animation: planeRotate 2.2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes planeRotate {
  0%   { transform: rotate(-10deg) translateY(0);    }
  40%  { transform: rotate(10deg)  translateY(-6px); }
  80%  { transform: rotate(-4deg)  translateY(-2px); }
  100% { transform: rotate(-10deg) translateY(0);    }
}

.loader-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2.5px solid rgba(239, 102, 3, 0.35);
  animation: pulseRing 2.2s ease-out infinite;
}
.loader-pulse-ring::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(239, 102, 3, 0.15);
  animation: pulseRing 2.2s ease-out infinite 0.4s;
}

@keyframes pulseRing {
  0%   { transform: scale(0.85); opacity: 0.9; }
  70%  { transform: scale(1.2);  opacity: 0;   }
  100% { transform: scale(1.2);  opacity: 0;   }
}

/* Title */
.loader-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.01em;
}

/* Progress bar */
.loader-progress-bar {
  width: 100%;
  height: 4px;
  background: #E8EAEF;
  border-radius: 99px;
  overflow: hidden;
}
.loader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #EF6603, #FF8534);
  border-radius: 99px;
  animation: progressFill 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progressFill {
  0%   { width: 0%;   opacity: 1; }
  80%  { width: 92%;  opacity: 1; }
  95%  { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

/* Rotating text steps */
.loader-text-rotator {
  height: 22px;
  overflow: hidden;
  position: relative;
}
.loader-step {
  display: block;
  position: absolute;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #6B7280;
}
.loader-step.active {
  opacity: 1;
  transform: translateY(0);
}


/* ─── Flatpickr Light Theme Override ─────────────────────────── */
.flatpickr-calendar {
  background: #ffffff !important;
  border: 1.5px solid #E8EAEF !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(15,23,42,0.14) !important;
  font-family: 'Inter', sans-serif !important;
  overflow: hidden !important;
}

.flatpickr-months {
  background: #EF6603 !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 8px 0 !important;
}

.flatpickr-current-month { color: #fff !important; font-weight: 700 !important; }
.flatpickr-prev-month, .flatpickr-next-month { fill: #fff !important; }
.flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg { fill: rgba(255,255,255,0.75) !important; }

.flatpickr-weekdays { background: #FFF4EC !important; }
.flatpickr-weekday { color: #EF6603 !important; font-weight: 700 !important; font-size: 0.75rem !important; }

.flatpickr-day {
  color: #0F172A !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  transition: background 120ms !important;
}
.flatpickr-day:hover { background: #FFF4EC !important; border-color: #EF6603 !important; }
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #EF6603 !important;
  border-color: #EF6603 !important;
  color: #fff !important;
}
.flatpickr-day.inRange {
  background: #FFE4CC !important;
  border-color: transparent !important;
  color: #D45700 !important;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #D1D5DB !important;
}

/* ─── Mobile Sticky Search Bar ───────────────────────────────── */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1.5px solid #E8EAEF;
  padding: 12px 20px;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(15,23,42,0.10);
}

@media (max-width: 768px) {
  .mobile-sticky-bar { display: block; }
}

/* ─── Travelers Popover ───────────────────────────────────────── */
.travelers-popover {
  background: #fff;
  border: 1.5px solid #E8EAEF;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.14);
  padding: 20px;
  min-width: 260px;
  animation: dropdownFade 180ms ease;
  z-index: 200;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid #E8EAEF;
  background: #fff;
  color: #EF6603;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 120ms;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: #EF6603; color: #fff; border-color: #EF6603; }

/* ─── Scroll-to-top Button ───────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #EF6603;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(239,102,3,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: all 300ms ease;
  z-index: 80;
}
#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: #FF8534; transform: translateY(-2px); }

/* ─── Cabin Select ───────────────────────────────────────────── */
.cabin-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23EF6603' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* ─── Hero Scroll Indicator ──────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: bounce 2.4s ease-in-out infinite;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
