/* ===== Duffel Frontend Tokens =================================== */
.tbw{
  /* brand */
  --tbw-brand-600:#3b82f6; /* primary */
  --tbw-brand-700:#2563eb; /* hover */
  /* surfaces & text */
  --tbw-surface:#ffffff;
  --tbw-surface-1:#f9fafb;
  --tbw-text:#111827;
  --tbw-text-600:#374151;
  --tbw-text-500:#6b7280;
  --tbw-text-400:#9ca3af;
  --tbw-muted:#9ca3af;
  --tbw-border:#e5e7eb;
  /* layout */
  --tbw-radius:10px;
  --tbw-gap:16px;
  --tbw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
  --tbw-density:comfortable;
  --tbw-content-max:min(var(--wp--style--global--content-size, 720px), 1024px);
  /* foundation tokens */
  --tbw-field-height:48px;
  --tbw-space-1:4px; --tbw-space-2:8px; --tbw-space-3:12px; --tbw-space-4:16px; --tbw-space-5:24px;
  --tbw-radius-lg: calc(var(--tbw-radius) + 6px);
  --tbw-focus: 0 0 0 3px color-mix(in srgb, var(--tbw-brand-600) 25%, transparent);
  --tbw-shadow-hover: 0 6px 18px rgba(0,0,0,.12);
  /* buttons */
  --tbw-btn-foreground:#ffffff;
  /* container */
  container: inline-size;
}

/* ===== Pill Search Layout ======================================= */
.tbw .tbw-hero-search {
  text-align: center;
  padding: 48px 0;
}

.tbw .tbw-hero-content {
  margin-bottom: 32px;
}

.tbw .tbw-hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 12px 0;
  color: var(--tbw-text);
}

.tbw .tbw-hero-subtitle {
  font-size: 20px;
  color: var(--tbw-text-500);
  margin: 0;
}

/* Unified Pill Bar Container - One capsule for entire row */
.tbw .tbw-pillbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: white;
  border-radius: 999px;
  padding: 8px;
  box-shadow: var(--tbw-shadow);
  margin: 0 auto;
  border: 1px solid var(--tbw-border);
  max-width: max-content;
}

/* Individual Pill - No individual backgrounds/borders */
.tbw .tbw-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 0;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  height: 48px;
}

/* Add subtle dividers between pills */
.tbw .tbw-pill:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: var(--tbw-border);
  opacity: 0.5;
}

.tbw .tbw-pill:hover {
  background: var(--tbw-surface-1);
  border-radius: 8px;
}

.tbw .tbw-pill:focus-within {
  background: var(--tbw-surface-1);
  border-radius: 8px;
}

.tbw .tbw-pill-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--tbw-text-400);
}

.tbw .tbw-pill-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.tbw .tbw-pill-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tbw-text-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.tbw .tbw-pill-input {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--tbw-text);
  outline: none;
  min-width: 120px;
  text-align: left;
  cursor: pointer;
}

.tbw .tbw-pill-input::placeholder {
  color: var(--tbw-text-400);
  font-weight: 400;
}

/* Swap Button - Integrated into pill bar */
.tbw .tbw-swap-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--tbw-surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--tbw-text-500);
  flex-shrink: 0;
}

.tbw .tbw-swap-btn:hover {
  background: var(--tbw-brand-600);
  color: white;
  transform: rotate(180deg);
}

/* Dates Wrapper */
.tbw .tbw-dates-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tbw .tbw-date-input {
  min-width: auto;
  width: 110px;
}

.tbw .tbw-date-separator {
  color: var(--tbw-text-400);
  font-size: 14px;
}

/* Passengers Trigger */
.tbw .tbw-passengers-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-width: 160px;
}

.tbw .tbw-passengers-text {
  text-align: left;
}

.tbw .tbw-chevron {
  flex-shrink: 0;
  color: var(--tbw-text-400);
}

/* Passengers Dropdown */
.tbw .tbw-passengers-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  background: white;
  border-radius: var(--tbw-radius);
  box-shadow: var(--tbw-shadow-hover);
  border: 1px solid var(--tbw-border);
  padding: 20px;
  z-index: 1000;
}

.tbw .tbw-passenger-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--tbw-border);
}

.tbw .tbw-passenger-type:last-of-type {
  border-bottom: none;
}

.tbw .tbw-passenger-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tbw .tbw-passenger-label span:first-child {
  font-weight: 600;
  color: var(--tbw-text);
}

.tbw .tbw-passenger-age {
  font-size: 12px;
  color: var(--tbw-text-500);
}

.tbw .tbw-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tbw .tbw-counter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--tbw-border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--tbw-text-600);
  transition: all 0.2s ease;
}

.tbw .tbw-counter-btn:hover:not(:disabled) {
  background: var(--tbw-brand-600);
  color: white;
  border-color: var(--tbw-brand-600);
}

.tbw .tbw-counter-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tbw .tbw-counter-value {
  width: 40px;
  text-align: center;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--tbw-text);
}

.tbw .tbw-class-selector {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--tbw-border);
}

.tbw .tbw-class-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--tbw-text);
}

.tbw .tbw-class-select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--tbw-border);
  border-radius: var(--tbw-radius);
  font-size: 14px;
  color: var(--tbw-text);
  background: white;
  cursor: pointer;
}

.tbw .tbw-passengers-done {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: var(--tbw-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tbw .tbw-passengers-done:hover {
  background: var(--tbw-brand-700);
}

/* Search Button - Part of unified pill */
.tbw .tbw-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 40px;
  margin: 4px;
}

.tbw .tbw-search-btn:hover {
  background: var(--tbw-brand-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tbw .tbw-search-btn svg {
  width: 20px;
  height: 20px;
}

/* Responsive: Stack pills on small screens */
@container (max-width: 768px) {
  .tbw .tbw-hero-title {
    font-size: 32px;
  }
  
  .tbw .tbw-hero-subtitle {
    font-size: 16px;
  }
  
  .tbw .tbw-pillbar {
    grid-auto-flow: row;
    grid-auto-columns: 1fr;
    border-radius: var(--tbw-radius-lg);
    gap: 12px;
    padding: 16px;
  }
  
  .tbw .tbw-pill {
    width: 100%;
    padding: 16px;
    border-radius: var(--tbw-radius);
    border: 1px solid var(--tbw-border);
  }
  
  .tbw .tbw-swap-btn {
    display: none;
  }
  
  .tbw .tbw-search-btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    border-radius: var(--tbw-radius);
  }
}

/* Modify Search Button */
.tbw .tbw-modify-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 1px solid var(--tbw-border);
  border-radius: var(--tbw-radius);
  color: var(--tbw-text-600);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tbw .tbw-modify-btn:hover {
  background: var(--tbw-surface-1);
  border-color: var(--tbw-text-400);
}

/* Theme presets */
.tbw.tbw-theme-air{
  --tbw-brand-600:#ff385c;
  --tbw-brand-700:#e31c5f;
  --tbw-radius:14px;
  --tbw-gap:18px;
  --tbw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
}

.tbw.tbw-theme-minimal{
  --tbw-brand-600:#111827;
  --tbw-brand-700:#000000;
  --tbw-radius:8px;
  --tbw-gap:14px;
  --tbw-shadow:none;
  --tbw-density:compact;
}

.tbw.tbw-theme-bold{
  --tbw-brand-600:#7c3aed;
  --tbw-brand-700:#6d28d9;
  --tbw-radius:16px;
  --tbw-gap:20px;
  --tbw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
}

/* Layout variants */
.tbw.tbw-layout-hero{
  --tbw-content-max:1140px;
  --tbw-gap:20px;
  --tbw-density:comfortable;
}

.tbw.tbw-layout-sidebar{
  --tbw-content-max:360px;
  --tbw-density:compact;
  --tbw-radius:max(8px, var(--tbw-radius));
}

/* Width modifiers */
.tbw.tbw-width-content .tbw-card{max-width:var(--tbw-content-max);}
.tbw.tbw-width-wide .tbw-card{max-width:1200px;}
.tbw.tbw-width-full .tbw-card{max-width:100%;}

/* base container and form reset (scoped) */
.tbw{
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  font-kerning:normal;
  font-feature-settings:"kern" 1,"liga" 1;
  color:var(--tbw-text);
}
.tbw .tbw-card{background:var(--tbw-surface);border-radius:var(--tbw-radius);box-shadow:var(--tbw-shadow);padding:1.5rem;margin:0 auto}
.tbw input,.tbw select,.tbw button,.tbw textarea{font:inherit}
.tbw .tbw-btn{padding:.65rem 1.25rem;border-radius:8px;border:0;background:var(--tbw-brand-600);color:#fff;cursor:pointer}
.tbw .tbw-btn:hover{background:var(--tbw-brand-700)}

/* Unified input/button rhythm - Premium refinements */
.tbw .tbw-input, .tbw input[type=text], .tbw input[type=date], .tbw input[type=number], .tbw select.tbw-select, .tbw select {
  height: var(--tbw-field-height);
  padding: 0 var(--tbw-space-4);
  border: 1px solid var(--tbw-border);
  border-radius: 8px;
  background: #fff;
  line-height: 1.2;
  font-size: 15px;
  transition: all 0.2s ease;
}
.tbw .tbw-input:focus, .tbw select:focus, .tbw input:focus { 
  outline: none; 
  box-shadow: var(--tbw-focus); 
  border-color: var(--tbw-brand-600); 
  transform: translateY(-1px);
}
.tbw .tbw-btn, .tbw button.tbw-btn, .tbw .tbw-primary-btn {
  height: var(--tbw-field-height);
  padding: 0 var(--tbw-space-5);
  border-radius: 8px;
  border: 0;
  background: var(--tbw-brand-600);
  color: var(--tbw-btn-foreground,#fff);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.tbw .tbw-btn:hover { 
  box-shadow: var(--tbw-shadow-hover); 
  background: var(--tbw-brand-700); 
  transform: translateY(-1px);
}

/* Trip-type segmented control */
.tbw .tbw-trip-type { display:inline-flex; gap:6px; background:var(--tbw-surface-1); padding:4px; border-radius:999px; }
.tbw .tbw-trip-type button { height:36px; padding:0 14px; border-radius:999px; border:0; background:transparent; color:var(--tbw-text-600); cursor:pointer; }
.tbw .tbw-trip-type button.active { background:#fff; color:#111; box-shadow:0 1px 2px rgba(0,0,0,.06); }

/* ================================================================ */

/* Duffel Flight Search Component Styles */

/* Base card styles */
.tbw-card {
  background: var(--tbw-surface);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

/* Form container */
.tbw-flight-search {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Trip type buttons */
.tbw-trip-type {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tbw-trip-type button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--tbw-border);
  border-radius: 6px;
  background: var(--tbw-surface-1);
  color: var(--tbw-text-500);
  cursor: pointer;
  transition: all 0.2s;
}

.tbw-trip-type button.active {
  background: var(--tbw-brand-600);
  color: white;
  border-color: var(--tbw-brand-600);
}

.tbw-trip-type button:hover:not(.active) {
  background: var(--tbw-surface-1);
}

/* Form grid */
.tbw-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .tbw-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tbw-form-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Form groups */
.tbw-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tbw-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tbw-text-600);
}

.tbw-form-group input,
.tbw-form-group select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.tbw-form-group input:focus,
.tbw-form-group select:focus {
  outline: none;
  border-color: var(--tbw-brand-600);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Secondary options */
.tbw-secondary-options {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .tbw-secondary-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Passenger counters */
.tbw-passengers {
  background: var(--tbw-surface-1);
  border: 1px solid var(--tbw-border);
  border-radius: 6px;
  padding: 1rem;
}

.tbw-passenger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.tbw-passenger-row:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.tbw-passenger-info {
  flex: 1;
}

.tbw-passenger-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tbw-text-600);
}

.tbw-passenger-age {
  font-size: 0.75rem;
  color: var(--tbw-text-500);
}

.tbw-passenger-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tbw-passenger-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: var(--tbw-text-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.tbw-passenger-btn:hover:not(:disabled) {
  background: var(--tbw-surface-1);
  border-color: #9ca3af;
}

.tbw-passenger-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tbw-passenger-count {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Search button */
.tbw-search-btn {
  width: 100%;
  padding: 1rem;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.tbw-search-btn:hover {
  background: var(--tbw-brand-700);
}

.tbw-search-btn:active {
  background: #1d4ed8;
}

/* Container queries for responsive cards */
@container (max-width: 640px) {
  .tbw-card {
    padding: 1rem;
  }
  
  .tbw-form-grid {
    grid-template-columns: 1fr;
  }
  
  .tbw-secondary-options {
    grid-template-columns: 1fr;
  }
}

@container (min-width: 640px) and (max-width: 900px) {
  .tbw-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@container (min-width: 900px) {
  .tbw-form-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Skeleton loading states */
.tbw-skeleton {
  animation: tbw-shimmer 2s ease-in-out infinite;
  background: linear-gradient(90deg, 
    var(--tbw-surface-1) 0%, 
    rgba(255,255,255,0.5) 50%, 
    var(--tbw-surface-1) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
}

@keyframes tbw-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.tbw-skeleton-text {
  height: 1em;
  margin: 0.5em 0;
  border-radius: 4px;
}

.tbw-skeleton-button {
  height: 48px;
  width: 120px;
  border-radius: var(--tbw-radius);
}

.tbw-skeleton-card {
  height: 180px;
  width: 100%;
  border-radius: var(--tbw-radius);
  margin-bottom: 1rem;
}

/* Flight Results Styles */
.tbw-results-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tbw-result-card {
  background: white;
  border: 1px solid var(--tbw-border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s;
  cursor: pointer;
}

.tbw-result-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: var(--tbw-brand-600);
}

.tbw-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tbw-airline-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tbw-airline-logo {
  width: 40px;
  height: 40px;
  background: var(--tbw-surface-1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--tbw-text-500);
}

.tbw-airline-name {
  font-weight: 500;
  color: var(--tbw-text-600);
}

.tbw-flight-number {
  font-size: 0.875rem;
  color: var(--tbw-text-500);
}

.tbw-price-info {
  text-align: right;
}

.tbw-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tbw-text);
  line-height: 1;
}

.tbw-price-per {
  font-size: 0.875rem;
  color: var(--tbw-text-500);
}

.tbw-flight-details {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.tbw-departure-info,
.tbw-arrival-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tbw-arrival-info {
  text-align: right;
}

.tbw-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tbw-text);
  line-height: 1.2;
}

.tbw-airport {
  font-size: 0.875rem;
  color: var(--tbw-text-500);
}

.tbw-date {
  font-size: 0.75rem;
  color: var(--tbw-text-400);
}

.tbw-duration-info {
  text-align: center;
  position: relative;
}

.tbw-duration {
  font-size: 0.875rem;
  color: var(--tbw-text-600);
  margin-bottom: 0.5rem;
}

.tbw-flight-line {
  position: relative;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, var(--tbw-brand-600) 0%, var(--tbw-brand-600) 10%, var(--tbw-border) 10%, var(--tbw-border) 90%, var(--tbw-brand-600) 90%);
  margin: 0 auto;
}

.tbw-flight-line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tbw-brand-600);
}

.tbw-flight-line::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tbw-brand-600);
}

.tbw-stops {
  font-size: 0.75rem;
  color: var(--tbw-text-500);
  margin-top: 0.25rem;
}

.tbw-result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--tbw-surface-1);
}

.tbw-cabin-class {
  font-size: 0.875rem;
  color: var(--tbw-text-500);
}

.tbw-select-btn {
  padding: 0.75rem 1.5rem;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: var(--tbw-field-height);
}

.tbw-select-btn:hover {
  background: var(--tbw-brand-700);
  transform: translateY(-1px);
  box-shadow: var(--tbw-shadow-hover);
}

/* Offer Details Styles */
.tbw-offer-container {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.tbw-offer-header {
  background: linear-gradient(135deg, var(--tbw-brand-600) 0%, var(--tbw-brand-700) 100%);
  color: white;
  padding: 1.5rem;
}

.tbw-offer-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tbw-offer-route {
  font-size: 1rem;
  opacity: 0.9;
}

.tbw-offer-body {
  padding: 1.5rem;
}

.tbw-fare-breakdown {
  margin-bottom: 1.5rem;
}

.tbw-breakdown-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--tbw-text);
  margin-bottom: 1rem;
}

.tbw-fare-table {
  width: 100%;
  border-collapse: collapse;
}

.tbw-fare-table th {
  text-align: left;
  padding: 0.75rem;
  background: var(--tbw-surface-1);
  font-weight: 500;
  color: var(--tbw-text-500);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tbw-fare-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  color: var(--tbw-text-600);
}

.tbw-fare-table tr:last-child td {
  border-bottom: none;
}

.tbw-fare-total {
  font-weight: 600;
  color: var(--tbw-text);
}

.tbw-fare-total td {
  padding-top: 1rem;
  border-top: 2px solid var(--tbw-border);
  font-size: 1.125rem;
}

.tbw-rules-section {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.tbw-rules-title {
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tbw-rules-content {
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.5;
}

.tbw-offer-actions {
  padding: 1.5rem;
  background: var(--tbw-surface-1);
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.tbw-back-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #d1d5db;
  background: white;
  color: var(--tbw-text-600);
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tbw-back-btn:hover {
  background: var(--tbw-surface-1);
}

.tbw-continue-btn {
  padding: 0.75rem 1.5rem;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.tbw-continue-btn:hover {
  background: var(--tbw-brand-700);
}

/* Passenger Details Styles */
.tbw-passengers-container {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tbw-passengers-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--tbw-text);
  margin-bottom: 1.5rem;
}

.tbw-passenger-card {
  background: var(--tbw-surface-1);
  border: 1px solid var(--tbw-border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.tbw-passenger-header {
  font-weight: 600;
  color: var(--tbw-text-600);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.tbw-passenger-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .tbw-passenger-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tbw-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tbw-form-field.full-width {
  grid-column: 1 / -1;
}

.tbw-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tbw-text-600);
}

.tbw-form-label .required {
  color: #ef4444;
}

.tbw-form-input,
.tbw-form-select {
  padding: 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s;
}

.tbw-form-input:focus,
.tbw-form-select:focus {
  outline: none;
  border-color: var(--tbw-brand-600);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tbw-form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.tbw-contact-section {
  background: white;
  border: 1px solid var(--tbw-border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.tbw-section-title {
  font-weight: 600;
  color: var(--tbw-text-600);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.tbw-submit-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--tbw-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tbw-total-price {
  font-size: 1.25rem;
  color: var(--tbw-text);
}

.tbw-total-amount {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--tbw-brand-600);
}

.tbw-action-buttons {
  display: flex;
  gap: 1rem;
}

.tbw-cancel-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #d1d5db;
  background: white;
  color: var(--tbw-text-600);
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tbw-cancel-btn:hover {
  background: var(--tbw-surface-1);
}

.tbw-book-btn {
  padding: 0.75rem 2rem;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.tbw-book-btn:hover {
  background: var(--tbw-brand-700);
}

/* Container query fallback for older browsers */
@supports not (container-type: inline-size) {
  /* Fallback breakpoints when container queries unsupported */
  @media (max-width: 640px) { .tbw .tbw-form-grid { grid-template-columns: 1fr; } }
  @media (min-width: 641px) and (max-width: 900px) { .tbw .tbw-form-grid { grid-template-columns: repeat(2,1fr); } }
  @media (min-width: 901px) { .tbw .tbw-form-grid { grid-template-columns: repeat(4,1fr); } }
}

/* ================================================================ */
/* SEARCH RESULTS & AUTOCOMPLETE STYLES */
/* ================================================================ */

/* Airport Autocomplete */
.tbw-autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--tbw-border);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  display: none;
}

.tbw-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--tbw-border);
}

.tbw-autocomplete-item:last-child {
  border-bottom: none;
}

.tbw-autocomplete-item:hover {
  background: var(--tbw-surface-1);
}

.tbw-autocomplete-item strong {
  color: var(--tbw-brand-600);
  font-weight: 600;
  margin-right: 8px;
}

.tbw-autocomplete-item span {
  color: var(--tbw-text-600);
}

/* Search Results Container */
.tbw-search-results {
  margin-top: 2rem;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

.tbw-results-header {
  margin-bottom: 1.5rem;
}

.tbw-results-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--tbw-text);
  margin: 0 0 0.5rem 0;
}

.tbw-route-summary {
  color: var(--tbw-text-600);
  font-size: 1rem;
  margin: 0;
}

/* Upgrade Notice */
.tbw-upgrade-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
  padding: 1rem 1.5rem;
  border-radius: var(--tbw-radius);
  margin: 1rem 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Results List */
.tbw-results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Flight Card */
.tbw-flight-card {
  background: white;
  border: 1px solid var(--tbw-border);
  border-radius: var(--tbw-radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tbw-flight-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.tbw-demo-flight {
  position: relative;
  background: #fbfdff;
}

.tbw-flight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tbw-airline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.tbw-airline strong {
  font-size: 1.125rem;
  color: var(--tbw-text);
}

.tbw-operating-carrier {
  flex-basis: 100%;
  color: var(--tbw-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tbw-demo-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tbw-price,
.tbw-time strong {
  font-variant-numeric: tabular-nums;
}

.tbw-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tbw-brand-600);
}

.tbw-flight-details {
  display: block;
  margin-bottom: 1rem;
}

.tbw-time-info {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.tbw-time {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tbw-time strong {
  font-size: 1.25rem;
  color: var(--tbw-text);
}

.tbw-time span {
  font-size: 0.875rem;
  color: var(--tbw-text-500);
}

.tbw-route {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  position: relative;
}

.tbw-route::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tbw-border);
  transform: translateY(-50%);
}

.tbw-duration,
.tbw-stops {
  background: white;
  padding: 0 0.5rem;
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
  color: var(--tbw-text-600);
}

.tbw-flight-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.tbw-upgrade-btn {
  padding: 0.75rem 1.5rem;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.tbw-upgrade-btn:hover {
  background: var(--tbw-brand-700);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.tbw button:focus-visible,
.tbw a:focus-visible,
.tbw input:focus-visible,
.tbw select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tbw-brand-600) 35%, white);
  outline-offset: 2px;
}

/* Loading State */
.tbw-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.tbw-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--tbw-border);
  border-top-color: var(--tbw-brand-600);
  border-radius: 50%;
  animation: tbw-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes tbw-spin {
  to { transform: rotate(360deg); }
}

.tbw-loading p {
  color: var(--tbw-text-600);
  font-size: 1rem;
}

/* No Results */
.tbw-no-results {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--tbw-surface-1);
  border-radius: 12px;
}

.tbw-no-results p {
  color: var(--tbw-text-600);
  font-size: 1rem;
  margin: 0.5rem 0;
}

/* Error State */
.tbw-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  color: #991b1b;
}

.tbw-error strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .tbw-time-info {
    grid-template-columns: minmax(3.25rem, 1fr) minmax(5.5rem, 1.25fr) minmax(3.25rem, 1fr);
    gap: 0.5rem;
  }

  .tbw-time {
    min-width: 0;
  }

  .tbw-time strong {
    font-size: clamp(1.0625rem, 5.25vw, 1.25rem);
    white-space: nowrap;
  }

  .tbw-route {
    order: 0;
  }

  .tbw-route::before {
    width: auto;
    height: 2px;
    left: 0;
    right: 0;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .tbw-flight-actions {
    flex-direction: column;
  }

  .tbw-book-btn,
  .tbw-upgrade-btn {
    width: 100%;
  }
}

/* ================================================================ */
/* BOOKING CONFIRMATION & MODALS */
/* ================================================================ */

/* Booking Confirmation */
.tbw-booking-confirmation {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tbw-confirmation-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 3rem;
  line-height: 80px;
  border-radius: 50%;
}

.tbw-booking-confirmation h2 {
  font-size: 2rem;
  color: var(--tbw-text);
  margin: 0 0 1rem 0;
}

.tbw-booking-reference {
  font-size: 1.125rem;
  color: var(--tbw-text-600);
  margin: 1rem 0;
}

.tbw-booking-reference strong {
  color: var(--tbw-brand-600);
  font-weight: 600;
}

.tbw-confirmation-details {
  background: var(--tbw-surface-1);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.tbw-confirmation-details p {
  margin: 0.5rem 0;
  color: var(--tbw-text-600);
}

.tbw-confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.tbw-btn {
  padding: 0.75rem 2rem;
  background: var(--tbw-brand-600);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.tbw-btn:hover {
  background: var(--tbw-brand-700);
  transform: translateY(-1px);
}

.tbw-btn-secondary {
  padding: 0.75rem 2rem;
  background: white;
  color: var(--tbw-text);
  border: 1px solid var(--tbw-border);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tbw-btn-secondary:hover {
  background: var(--tbw-surface-1);
}

/* Upgrade Modal */
.tbw-upgrade-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.tbw-upgrade-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.tbw-upgrade-content h3 {
  font-size: 1.5rem;
  color: var(--tbw-text);
  margin: 0 0 1rem 0;
}

.tbw-upgrade-content p {
  color: var(--tbw-text-600);
  margin: 0 0 1rem 0;
}

.tbw-upgrade-content ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.tbw-upgrade-content ul li {
  padding: 0.5rem 0;
  color: var(--tbw-text-600);
  display: flex;
  align-items: center;
}

.tbw-upgrade-content ul li::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
  margin-right: 0.5rem;
}

.tbw-upgrade-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.tbw-upgrade-close {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--tbw-text-600);
  border: 1px solid var(--tbw-border);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tbw-upgrade-close:hover {
  background: var(--tbw-surface-1);
}

/* Print Styles */
@media print {
  .tbw-confirmation-actions {
    display: none;
  }

  .tbw-booking-confirmation {
    box-shadow: none;
  }
}

/* ================================================================ */
/* PAYMENT SECTION */
/* ================================================================ */

.tbw-payment-section {
  background: white;
  border-radius: var(--tbw-radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--tbw-shadow);
}

.tbw-payment-options {
  margin-bottom: 1.5rem;
}

.tbw-payment-options h4 {
  font-size: 1.125rem;
  color: var(--tbw-text);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.tbw-payment-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tbw-payment-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--tbw-border);
  border-radius: var(--tbw-radius);
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.tbw-payment-option:hover {
  border-color: var(--tbw-brand-600);
  background: var(--tbw-surface-1);
}

.tbw-payment-option input[type="radio"] {
  margin-right: 1rem;
  cursor: pointer;
  width: 20px;
  height: 20px;
  accent-color: var(--tbw-brand-600);
}

.tbw-payment-option input[type="radio"]:checked ~ .tbw-payment-option-content {
  color: var(--tbw-brand-600);
}

.tbw-payment-option:has(input:checked) {
  border-color: var(--tbw-brand-600);
  background: color-mix(in srgb, var(--tbw-brand-600) 5%, white);
}

.tbw-payment-option-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.tbw-payment-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbw-payment-icon svg {
  width: 32px;
  height: 32px;
}

.tbw-payment-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tbw-payment-details strong {
  color: var(--tbw-text);
  font-weight: 600;
  font-size: 1rem;
}

.tbw-payment-description {
  color: var(--tbw-text-500);
  font-size: 0.875rem;
}

/* Payment Form Container */
.tbw-payment-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tbw-border);
}

/* Stripe Form */
.tbw-stripe-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tbw-stripe-element {
  padding: 0.75rem 1rem;
  border: 1px solid var(--tbw-border);
  border-radius: var(--tbw-radius);
  background: white;
  transition: all 0.2s;
}

.tbw-stripe-element:focus-within {
  border-color: var(--tbw-brand-600);
  box-shadow: var(--tbw-focus);
}

/* PayPal Container */
.tbw-paypal-container {
  margin-top: 1rem;
}

/* Duffel Payments Form */
.tbw-duffel-payments-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tbw-info-text {
  background: var(--tbw-surface-1);
  padding: 1rem;
  border-radius: var(--tbw-radius);
  color: var(--tbw-text-600);
  font-size: 0.875rem;
  margin: 0;
}

.tbw-duffel-element {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tbw-card-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
}

/* Payment Errors */
.tbw-payment-errors {
  margin-top: 1rem;
}

.tbw-payment-errors .tbw-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--tbw-radius);
  padding: 0.75rem 1rem;
  color: #991b1b;
  font-size: 0.875rem;
}

/* Form Field Overrides for Payment Section */
.tbw-payment-form .tbw-form-field {
  margin-bottom: 0;
}

.tbw-payment-form .tbw-form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--tbw-text);
  font-weight: 500;
  font-size: 0.875rem;
}

.tbw-payment-form .tbw-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tbw-border);
  border-radius: var(--tbw-radius);
  font-size: 1rem;
  transition: all 0.2s;
}

.tbw-payment-form .tbw-form-input:focus {
  outline: none;
  border-color: var(--tbw-brand-600);
  box-shadow: var(--tbw-focus);
}

/* Responsive Payment Section */
@media (max-width: 640px) {
  .tbw-payment-section {
    padding: 1.5rem;
  }

  .tbw-card-details {
    grid-template-columns: 1fr;
  }

  .tbw-payment-option-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .tbw-payment-icon {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }
}
