/* ============================================================
   TYKTT QUICKWAVE — Global Style System
   Premium B2B Flight Booking SaaS Platform
   Design: Deep Slate + Indigo + Emerald accent
   ============================================================ */

/* ── Google Font Import ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --custom-color: #4f46e5;

  /* Color Palette */
  --color-indigo-50:  #eef2ff;
  --color-indigo-100: #e0e7ff;
  --color-indigo-500: #6366f1;
  --color-indigo-600: #4f46e5;
  --color-indigo-700: #4338ca;
  --color-indigo-900: #1e1b4b;

  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;

  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;

  /* Semantic tokens */
  --bg-primary:    var(--color-slate-950);
  --bg-secondary:  var(--color-slate-900);
  --bg-surface:    var(--color-slate-800);
  --bg-elevated:   var(--color-slate-700);
  --bg-page:       #f0f4f8;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #f8fafc;

  --border-default: rgba(148, 163, 184, 0.18);
  --border-strong:  rgba(148, 163, 184, 0.35);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.08);
  --shadow-xl:  0 24px 64px rgba(0,0,0,.16);
  --shadow-glow: 0 0 0 3px rgba(99,102,241,.22);

  --transition-fast: 150ms cubic-bezier(.4,0,.2,1);
  --transition-base: 250ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 400ms cubic-bezier(.4,0,.2,1);

  --font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ── Base Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans) !important;
  background: var(--bg-page) !important;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  font-style: normal !important;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-slate-100); }
::-webkit-scrollbar-thumb { background: var(--color-slate-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-slate-400); }

/* ── Button Base ── */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition-fast) !important;
  box-shadow: none !important;
}

.btn:active { transform: translateY(1px); }

/* Primary / back_btn → uses --custom-color */
.back_btn,
.btn-primary-custom {
  background: var(--custom-color) !important;
  border-color: var(--custom-color) !important;
  color: #fff !important;
  border-radius: var(--radius-md) !important;
}
.back_btn:hover,
.btn-primary-custom:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,.35) !important;
}

/* ── Form Controls ── */
.form-control,
.form-select {
  border: 1.5px solid var(--color-slate-200);
  border-radius: var(--radius-md) !important;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  padding: 10px 14px;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--custom-color);
  box-shadow: 0 0 0 3px rgba(99,102,241,.14) !important;
  outline: none;
}
.form-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* ── Utility: Brand color helpers ── */
.make_color_one,
.make_color_two { color: var(--custom-color) !important; }
.give_color { background: var(--custom-color) !important; color: #fff !important; }

.give_background,
.make_bg_one,
.make_bg_two,
.make_bg_base,
.btn-dark { background: var(--custom-color) !important; }

.make_border,
.make_border_two { border: 1.5px solid var(--custom-color) !important; }
.make_border_bottom { border-bottom: 3px solid var(--custom-color) !important; }

.flight_btn,
.progress-bar {
  background: var(--custom-color) !important;
  box-shadow: none !important;
}

/* ── Cover overlay (base.html) ── */
.cover_dashboard {
  display: none;
}

/* ── iziToast overrides ── */
.iziToast {
  border-radius: var(--radius-lg) !important;
  font-family: var(--font-sans) !important;
}

/* ── Blink animation ── */
.blink-red {
  animation: smooth-blink 5s ease-in-out infinite;
}
@keyframes smooth-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Progress bar animation ── */
.progress-bar-animated-custom {
  animation: loadProgress 30s linear infinite;
}
@keyframes loadProgress {
  0%   { width: 0%; }
  100% { width: 100%; }
}

/* ── Preloader Modal — Modern Unified Design ── */
.qw-preloader-modal {
  max-width: 400px;
  width: calc(100% - 2rem);
}

.qw-preloader-modal .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
}

.qw-preloader-modal .modal-content::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--custom-color, #4f46e5);
}

.qw-preloader-modal .modal-body {
  padding: 0 !important;
}

.qw-preloader-modal [id^="preloader"] {
  padding: 1.75rem 2rem !important;
  gap: 0.5rem;
}

.qw-preloader-modal .preloader_img {
  max-width: 72px !important;
  width: 72px;
  animation: qw-preloader-pulse 2s ease-in-out infinite;
}

.qw-preloader-modal .preloader_text {
  font-size: 14px !important;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem !important;
}

.qw-preloader-modal .progress {
  height: 4px;
  border-radius: 99px;
  background: #f1f5f9;
  overflow: hidden;
}

.qw-preloader-modal .progress-bar {
  border-radius: 99px;
}

@keyframes qw-preloader-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(0.95); }
}

/* ── Modal polish ── */
.modal-content {
  border: none;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.modal-body {
  padding: 2rem;
}

/* ── Badge system (qw-status-badge) ── */
.qw-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.qw-status-reserved  { background: #fef3c7; color: #92400e; }
.qw-status-issued    { background: #d1fae5; color: #065f46; }
.qw-status-cancelled { background: #fee2e2; color: #991b1b; }
.qw-status-voided    { background: #e0f2fe; color: #075985; }
.qw-status-exchanged { background: #f3e8ff; color: #6b21a8; }
.qw-status-refunded  { background: #f0fdf4; color: #166534; }

/* ── Booking card (shared qw-booking-card) ── */
.qw-booking-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
}

/* ── Submit button ── */
.qw-submit-btn {
  background: var(--custom-color, #4f46e5);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md) !important;
  padding: 13px 24px;
  cursor: pointer;
  transition: filter var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  letter-spacing: 0.01em;
  width: 100%;
  display: block;
}

.qw-submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,.35);
}

.qw-submit-btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* ── Pill status badges (manage booking page) ── */
.qw-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.qw-pill-issued    { background: #d1fae5; color: #065f46; }
.qw-pill-reserved  { background: #fef3c7; color: #92400e; }
.qw-pill-cancelled { background: #fee2e2; color: #991b1b; }
.qw-pill-voided    { background: #e0f2fe; color: #075985; }
.qw-pill-other     { background: #f1f5f9; color: #475569; }

/* ── Table ── */
.qw-info-table {
  width: 100%;
  font-size: 13px;
}

.qw-info-table th {
  font-weight: 700;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 2px solid #e2e8f0;
}

.qw-info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}

.qw-info-table tbody tr:last-child td { border-bottom: none; }
.qw-info-table tbody tr:hover td { background: #f8fafc; }

/* ── Summary card (booking sidebar) ── */
.qw-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
}

/* ── Section label ── */
.qw-section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}

/* ── Itinerary header banner ── */
.qw-itinerary-header {
  background: var(--custom-color, #4f46e5);
  color: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

/* ── Segment card ── */
.qw-segment-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

/* ── Price display ── */
.qw-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

/* ── Flight card ── */
.qw-flight-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.qw-flight-card:hover {
  box-shadow: 0 6px 24px rgba(15,23,42,.10);
  transform: translateY(-1px);
}

/* ── Filter card ── */
.qw-filter-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* ── Business info tab nav ── */
.qw-biz-tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.qw-biz-tab-nav .nav-link {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px 8px 0 0;
  padding: 9px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}

.qw-biz-tab-nav .nav-link:hover {
  color: var(--custom-color, #4f46e5);
}

.qw-biz-tab-nav .nav-link.active {
  color: var(--custom-color, #4f46e5);
  border-bottom-color: var(--custom-color, #4f46e5);
}

/* ── Layover badge ── */
.qw-layover-badge {
  display: inline-flex;
  align-items: center;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 12px;
}

/* ── Focus ring accessibility ── */
:focus-visible {
  outline: 2px solid var(--custom-color, #4f46e5);
  outline-offset: 2px;
}

/* ── Responsive utilities ── */
@media (max-width: 575.98px) {
  .qw-booking-card { padding: 14px 16px; }
  .qw-summary-card { padding: 14px 16px; }
}

/* ── Global Responsive Table (mobile card view) ── */
.qw-responsive-table {
  width: 100%;
}

@media (max-width: 1024px) {
  .qw-responsive-table thead {
    display: none;
  }
  .qw-responsive-table tbody tr {
    display: block;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
  }
  .qw-responsive-table tbody tr:hover { background: #f8fafc; }
  .qw-responsive-table tbody td {
    display: block;
    padding: 8px 0;
    border: none !important;
    font-size: 13.5px;
    color: #0f172a;
    /* Override Bootstrap truncation utilities */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
    word-break: break-word;
  }
  .qw-responsive-table tbody td::before {
    display: block;
    content: attr(data-label);
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #94a3b8;
    margin-bottom: 3px;
  }
  .qw-responsive-table tbody td:first-child {
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9 !important;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
  }
  .qw-responsive-table tbody td:first-child::before { content: none; }

  /* Remove horizontal scroll from table-responsive wrapper */
  .table-responsive {
    overflow-x: visible !important;
  }

  /* Handle tbody th[scope=row] as a name/title cell (same as first td) */
  .qw-responsive-table tbody th[scope="row"] {
    display: block;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9 !important;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none !important;
    white-space: normal !important;
  }
}

/* ══════════════════════════════════════════════
   QwSelect — Custom Searchable Select
   Tyktt Quickwave Design System
   ══════════════════════════════════════════════ */

/* Wrapper replaces the native select in the layout */
.qw-select-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

/* The visible trigger button */
.qw-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: #334155;
  min-height: 44px;
  user-select: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  outline: none;
  line-height: 1.4;
}
.qw-select-trigger:hover { border-color: var(--custom-color); }
.qw-select-trigger:focus {
  border-color: var(--custom-color);
  box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}
.qw-select-open .qw-select-trigger {
  border-color: var(--custom-color);
  box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

/* Current value text */
.qw-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}
.qw-select-value.is-placeholder { color: #94a3b8; }

/* Chevron arrow */
.qw-select-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 11px;
  transition: transform 200ms ease;
  line-height: 1;
}
.qw-select-open .qw-select-arrow { transform: rotate(180deg); }

/* Dropdown panel — fixed positioning escapes all overflow:hidden parents */
.qw-select-dropdown {
  position: fixed;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15,23,42,.13), 0 2px 8px rgba(15,23,42,.06);
  z-index: 99999;
  display: none;
  overflow: hidden;
  min-width: 200px;
}
.qw-select-open .qw-select-dropdown {
  display: block;
  animation: qwSelectIn 140ms cubic-bezier(.16,1,.3,1);
}
.qw-select-dropdown--top {
  animation: qwSelectInUp 140ms cubic-bezier(.16,1,.3,1) !important;
}
@keyframes qwSelectIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes qwSelectInUp {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Search bar */
.qw-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}
.qw-select-search-icon { color: #94a3b8; font-size: 12px; flex-shrink: 0; }
.qw-select-search {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.qw-select-search::placeholder { color: #94a3b8; }

/* Options list */
.qw-select-options {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.qw-select-options::-webkit-scrollbar { width: 4px; }
.qw-select-options::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* Individual option */
.qw-select-option {
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: #334155;
  transition: background 100ms ease, color 100ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qw-select-option:hover:not(.qw-select-option--disabled) {
  background: #f1f5f9;
  color: #0f172a;
}
.qw-select-option--selected {
  background: color-mix(in srgb, var(--custom-color) 10%, #fff);
  color: var(--custom-color);
  font-weight: 600;
}
.qw-select-option--selected:hover {
  background: color-mix(in srgb, var(--custom-color) 16%, #fff);
}
.qw-select-option--placeholder { color: #94a3b8; font-style: italic; }
.qw-select-option--disabled { opacity: 0.4; cursor: not-allowed; }

/* Empty / no results */
.qw-select-empty {
  padding: 16px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}

/* Disabled wrapper */
.qw-select-wrapper.qw-select--disabled .qw-select-trigger {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  border-color: #e2e8f0;
  pointer-events: none;
}
.qw-select-wrapper.qw-select--disabled .qw-select-arrow { opacity: 0.4; }

/* Integrate with form-select / form-control sizing context */
.input-group .qw-select-wrapper { flex: 1 1 auto; }
.input-group .qw-select-trigger { border-radius: 0; }
.input-group .qw-select-wrapper:first-child .qw-select-trigger { border-radius: 10px 0 0 10px; }
.input-group .qw-select-wrapper:last-child .qw-select-trigger { border-radius: 0 10px 10px 0; }

