html{ scroll-behavior: smooth !important; }
  #atc-booking{ scroll-margin-top: 100px; } /* keeps the widget from landing hidden behind a sticky header */

  #atc-booking, #atc-booking *{ box-sizing: border-box !important; }
  #atc-booking{
    --navy:#153A66; --navy-deep:#0B2440;
    /* Card-palette gold, same as the popup redesign. --yellow is a FILL
       (ink text sits on it); --gold-ink is for gold used as text, where
       the bright tones fail contrast on white. */
    --yellow:#F4B33C; --yellow-dim:#FFDD8A; --gold-ink:#8A5E28;
    --sand:#FFF9EC; --line:#e7e2d6; --text:#22334a; --muted:#6b7a8e;
    width: 80% !important;
    max-width: 1400px !important;
    margin: -60px auto 0 !important;
    position:relative; z-index:5;
    display:flex !important; align-items:stretch;
    background:#fff !important;
    border-radius:14px !important;
    box-shadow: 0 20px 48px rgba(11,36,64,0.16) !important;
    font-family:'Public Sans', Arial, sans-serif !important;
    color:var(--text) !important;
    line-height:1.3 !important;
    overflow:hidden;
  }

  /* ---- Main (left) ---- */
  #atc-booking .atc-main{ flex:1 1 auto !important; padding:22px 26px !important; min-width:0; }

  #atc-booking .atc-title-row{ display:flex; align-items:center; gap:12px; margin-bottom:14px !important; flex-wrap:wrap;}
  #atc-booking h3{
    font-family:'Fraunces', Georgia, serif !important;
    font-size:1.2rem !important; line-height:1.2 !important;
    color:var(--navy-deep) !important; font-weight:600 !important; margin:0 !important; padding:0 !important;
  }
  #atc-booking .atc-badge{ background:var(--yellow) !important; color:var(--navy-deep) !important; font-size:0.62rem !important; font-weight:700 !important; padding:4px 10px !important; border-radius:100px !important; text-transform:uppercase; letter-spacing:0.03em; line-height:1.4 !important;}

  #atc-booking .atc-row{ display:flex; gap:8px; margin:0 !important; flex-wrap:wrap;}
  #atc-booking .atc-toggle-row{ margin-bottom:10px !important; }
  #atc-booking .atc-toggle{
    padding:9px 14px !important; border-radius:8px !important; border:1px solid var(--line) !important;
    background:#fff !important; color:var(--text) !important; font-weight:600 !important;
    font-size:0.78rem !important; line-height:1.2 !important; cursor:pointer; margin:0 !important;
    transition: all 0.15s; white-space:nowrap;
  }
  #atc-booking .atc-toggle:hover{ border-color: var(--yellow) !important; }
  #atc-booking .atc-toggle.active{ background:var(--yellow) !important; border-color:var(--yellow) !important; color:var(--navy-deep) !important; }

  #atc-booking .atc-airport-note{
    font-size:0.72rem !important; color:var(--muted) !important; margin-bottom:16px !important;
    background: rgba(21,58,102,0.05) !important; display:inline-block; padding:5px 10px !important; border-radius:6px !important;
  }

  /* Six fields in one row only fits above ~1300px.
     date and time inputs have a hard intrinsic floor (~145px and ~117px in
     Chrome, from the native picker UI) and cannot shrink. Because fr tracks
     default to min-width:auto, every pixel of squeeze landed on the text
     fields instead: at 1150px the location box collapsed to 96px, at 1000px
     to 53px and the row overflowed the card. minmax(0,...) lets the tracks
     share the loss, and the breakpoints below stop asking six fields to fit
     where they can't. */
  #atc-booking .atc-fields-grid{
    display:grid !important;
    grid-template-columns:
      minmax(0,1.6fr) minmax(132px,0.9fr) minmax(118px,0.9fr)
      minmax(0,0.9fr) minmax(0,1fr) minmax(0,1fr) !important;
    gap:12px !important; margin-bottom:16px !important; align-items:start;
  }
  #atc-booking input, #atc-booking textarea, #atc-booking select{ min-width:0 !important; }

  /* Labels in the main grid reserve two lines. "CHILD SEATS ($15 ea)" wraps
     at narrow column widths and, with align-items:start, that pushed its
     input a line lower than every other field in the row. Reserving the
     space makes the inputs line up whether a label wraps or not.
     Not applied to the contact grid, whose labels are all one line. */
  #atc-booking .atc-fields-grid:not(.atc-contact-grid) > .atc-field > label{
    min-height:2.4em !important;
    display:flex !important; align-items:flex-end !important;
  }
  #atc-booking .atc-contact-grid{ grid-template-columns: 1fr 1fr 1fr !important; margin-bottom:10px !important; }

  #atc-booking .atc-field{ margin:0 !important; }
  #atc-booking label{
    display:block !important; font-size:0.62rem !important; font-weight:700 !important;
    color:var(--muted) !important; text-transform:uppercase; letter-spacing:0.03em;
    margin-bottom:4px !important; line-height:1.2 !important;
  }
  #atc-booking .atc-optional{ text-transform:none; font-weight:400 !important; color:#9aa7b8 !important; letter-spacing:0;}

  #atc-booking input, #atc-booking select{
    width:100% !important; height:36px !important;
    padding:0 10px !important; border:1px solid var(--line) !important; border-radius:8px !important;
    font-family:'Public Sans', Arial, sans-serif !important; font-size:0.8rem !important; line-height:34px !important;
    color:var(--text) !important; background:#fff !important; margin:0 !important;
    transition: border-color 0.15s;
  }
  #atc-booking textarea{
    width:100% !important; height:auto !important;
    padding:8px 10px !important; border:1px solid var(--line) !important; border-radius:8px !important;
    font-family:'Public Sans', Arial, sans-serif !important; font-size:0.8rem !important; line-height:1.3 !important;
    color:var(--text) !important; background:#fff !important; margin:0 !important;
    transition: border-color 0.15s;
  }
  #atc-booking input:focus, #atc-booking select:focus, #atc-booking textarea:focus{
    outline:none !important; border-color:var(--gold-ink) !important; box-shadow:none !important;
  }

  /* ---- Counters (passengers / child seats) ---- */
  #atc-booking .atc-counter{
    display:flex !important; align-items:center; justify-content:space-between;
    height:36px !important; border:1px solid var(--line) !important; border-radius:8px !important; padding:0 6px !important;
  }
  #atc-booking .atc-count-btn{
    width:24px !important; height:24px !important; border-radius:6px !important; border:none !important;
    background:var(--sand) !important; color:var(--navy-deep) !important; font-size:1rem !important; font-weight:700 !important;
    cursor:pointer; line-height:1 !important; padding:0 !important; margin:0 !important;
    transition: background 0.15s;
  }
  #atc-booking .atc-count-btn:hover{ background:var(--yellow) !important; }
  #atc-booking .atc-count-btn:disabled{ opacity:0.4 !important; cursor:not-allowed; background:var(--sand) !important; }
  #atc-booking .atc-count-value{ font-family:'IBM Plex Mono', monospace !important; font-size:0.85rem !important; font-weight:600 !important; min-width:16px; text-align:center; }
  #atc-booking .atc-hint{ display:block !important; font-size:0.62rem !important; color:var(--muted) !important; margin-top:3px !important; line-height:1.2 !important; }
  #atc-booking #atc-flight-status{ white-space:normal !important; }

  #atc-booking .atc-diff-hotel-wrap{ margin-bottom:16px !important; }
  #atc-booking .atc-diff-hotel-toggle{
    display:flex !important; align-items:center; gap:8px; cursor:pointer;
    font-size:0.78rem !important; font-weight:600 !important; color:var(--navy) !important; margin-bottom:0 !important;
    text-transform:none !important; letter-spacing:0 !important;
  }
  #atc-booking .atc-diff-hotel-toggle input[type="checkbox"]{
    width:14px !important; height:14px !important; accent-color:var(--gold-ink); margin:0 !important; padding:0 !important;
  }
  #atc-booking .atc-return-field{ margin-top:10px !important; max-width:360px; }

  #atc-booking .atc-addons-label{
    display:block !important; font-size:0.62rem !important; font-weight:700 !important;
    color:var(--muted) !important; text-transform:uppercase; letter-spacing:0.03em; margin-bottom:8px !important;
  }
  #atc-booking .atc-addons{ display:flex !important; flex-wrap:wrap; gap:18px !important; margin-bottom:6px !important; }
  #atc-booking .atc-addon{ display:flex; flex-direction:column; gap:2px; cursor:pointer; min-width:90px; }
  #atc-booking .atc-addon-top{ display:flex; align-items:center; gap:6px; }
  #atc-booking .atc-addon input[type="checkbox"]{
    width:14px !important; height:14px !important; accent-color:var(--gold-ink); margin:0 !important; padding:0 !important;
  }
  #atc-booking .atc-addon-label{ font-size:0.76rem !important; font-weight:600 !important; color:var(--text) !important; line-height:1.2 !important;}
  #atc-booking .atc-addon-price{ font-family:'IBM Plex Mono', monospace !important; font-size:0.68rem !important; color:var(--muted) !important; padding-left:20px; }

  #atc-booking .atc-contact-toggle{
    font-size:0.76rem !important; font-weight:600 !important; color:var(--gold-ink) !important;
    cursor:pointer; margin-top:6px !important; user-select:none;
  }
  #atc-booking .atc-contact-fields{ margin-top:12px !important; padding-top:12px !important; border-top:1px dashed var(--line) !important; }

  /* ---- Side (right) ---- */
  #atc-booking .atc-side{
    flex:0 0 240px !important; width:240px !important;
    background:var(--sand) !important;
    border-left:1px solid var(--line) !important;
    padding:24px 22px !important;
    display:flex !important; flex-direction:column;
  }
  #atc-booking .atc-price-block{ display:flex; flex-direction:column; margin-bottom:14px !important; }
  #atc-booking .atc-price-label{ font-size:0.66rem !important; font-weight:700 !important; color:var(--muted) !important; text-transform:uppercase; letter-spacing:0.05em; line-height:1.3 !important;}
  #atc-booking .atc-price{ font-family:'IBM Plex Mono', monospace !important; font-size:1.9rem !important; font-weight:600 !important; color:var(--navy-deep) !important; transition: opacity 0.15s; line-height:1.2 !important; margin:2px 0 !important;}
  #atc-booking .atc-price-sub{ font-size:0.7rem !important; color:var(--muted) !important; line-height:1.2 !important;}

  #atc-booking .atc-breakdown-toggle{
    display:flex !important; justify-content:space-between; align-items:center; cursor:pointer;
    font-size:0.72rem !important; font-weight:600 !important; color:var(--navy) !important;
    padding:6px 0 !important; user-select:none;
  }
  #atc-booking .atc-breakdown-chevron{ transition:transform 0.15s; font-size:0.65rem !important; }
  #atc-booking .atc-breakdown-toggle.open .atc-breakdown-chevron{ transform:rotate(180deg); }

  #atc-booking .atc-breakdown{
    border-top:1px solid var(--line) !important; border-bottom:1px solid var(--line) !important;
    padding:10px 0 !important; margin-bottom:14px !important;
  }
  #atc-booking .atc-breakdown-line{
    display:flex !important; justify-content:space-between; gap:6px;
    font-size:0.64rem !important; color:var(--muted) !important; padding:2px 0 !important; line-height:1.3 !important;
  }
  #atc-booking .atc-breakdown-line span:first-child{ flex:1 1 auto; min-width:0; }
  #atc-booking .atc-breakdown-line span:last-child{ flex:0 0 auto; white-space:nowrap; }

  #atc-booking .atc-perks{ list-style:none !important; margin:0 0 16px 0 !important; padding:0 !important; display:flex; flex-direction:column; gap:6px; }
  #atc-booking .atc-perks li{ font-size:0.72rem !important; color:var(--text) !important; line-height:1.35 !important; }
  #atc-booking .atc-perk-note{ display:block; color:var(--muted) !important; font-size:0.66rem !important; padding-left:16px; }

  #atc-booking .atc-submit{
    background:var(--yellow) !important; color:var(--navy-deep) !important; border:none !important; border-radius:100px !important;
    padding:12px 18px !important; font-weight:700 !important; font-size:0.85rem !important; cursor:pointer;
    display:flex; align-items:center; justify-content:center; gap:8px; transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    width:100% !important; height:auto !important; line-height:1.2 !important; margin:0 0 10px 0 !important;
    box-shadow: 0 4px 14px rgba(244,179,60,0.32) !important;
  }
  #atc-booking .atc-submit:hover{ background:var(--yellow-dim) !important; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(244,179,60,0.42) !important; }
  #atc-booking .atc-submit:disabled{ opacity:0.7 !important; cursor:not-allowed; transform:none; }
  #atc-booking .atc-spinner{
    width:12px !important; height:12px !important; border:2px solid rgba(11,36,64,0.3) !important; border-top-color:var(--navy-deep) !important;
    border-radius:50% !important; animation: atc-spin 0.7s linear infinite;
  }
  @keyframes atc-spin{ to{ transform: rotate(360deg); } }

  #atc-booking .atc-secure{ font-size:0.64rem !important; color:var(--muted) !important; text-align:center; line-height:1.3 !important; }
  #atc-booking .atc-error{ margin-top:10px !important; padding:8px 10px !important; background:#fdeceb !important; border:1px solid #f3b9b3 !important; color:#a33 !important; border-radius:8px !important; font-size:0.72rem !important;}
  #atc-booking .atc-refund-check{
    display:flex !important; align-items:flex-start; gap:8px; font-size:0.76rem !important; color:var(--muted) !important;
    margin-top:14px !important; cursor:pointer; line-height:1.4 !important;
  }
  #atc-booking .atc-refund-check input[type="checkbox"]{ width:15px !important; height:15px !important; margin-top:1px !important; accent-color:var(--gold-ink); flex:0 0 auto; }
  #atc-booking .atc-refund-check a{ color:var(--navy) !important; font-weight:600; }

  .pac-container{
    z-index: 999999 !important; border-radius: 8px !important; margin-top:4px !important;
    font-family:'Public Sans', Arial, sans-serif !important; font-size:0.85rem !important;
    min-width: 320px !important; max-width: 90vw !important;
  }
  .pac-item{ white-space: normal !important; padding:8px 10px !important; line-height:1.4 !important; }
  .pac-item-query{ font-size:0.9rem !important; }

  /* 3 across: location takes its own full row, then date/time/flight,
     then the two counters. */
  @media (max-width: 1300px){
    #atc-booking .atc-fields-grid{ grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
    #atc-booking .atc-field-location{ grid-column: 1 / -1 !important; }
  }

  @media (max-width: 960px){
    #atc-booking{ flex-direction:column !important; width:auto !important; margin: -40px 16px 0 !important; }
    #atc-booking .atc-side{ flex:1 1 auto !important; width:100% !important; border-left:none !important; border-top:1px solid var(--line) !important; }
    #atc-booking .atc-fields-grid{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
    #atc-booking .atc-contact-grid{ grid-template-columns: 1fr !important; }
  }

  /* On a narrow phone two columns leave ~139px per field, still under the
     date input's floor, so it clipped. One column below 600px. */
  @media (max-width: 600px){
    #atc-booking .atc-fields-grid{ grid-template-columns: minmax(0,1fr) !important; }
    #atc-booking .atc-field-location{ grid-column: 1 / -1 !important; }
  }

/* ---- Country code + number as ONE field ----------------------------
   Two controls for correctness, one field visually. The wrapper owns the
   border and focus ring; the select and input inside are stripped and
   separated by a single hairline. */
#atc-booking .atc-ccwrap{
  display:flex !important; align-items:stretch !important;
  height:36px !important;
  border:1px solid var(--line) !important; border-radius:8px !important;
  background:#fff !important; overflow:hidden !important;
}
#atc-booking .atc-ccwrap:focus-within{ border-color:var(--gold-ink) !important; }
#atc-booking .atc-ccwrap select{
  flex:0 0 auto !important; max-width:56% !important;   /* fits the code for all but a handful of long names */ min-width:0 !important;
  width:auto !important; height:100% !important; margin:0 !important;
  border:none !important; border-right:1px solid var(--line) !important;
  border-radius:0 !important; background:var(--sand) !important;
  padding:0 4px 0 8px !important;
  font-size:0.8rem !important; color:var(--text) !important;
  outline:none !important; cursor:pointer;
}
#atc-booking .atc-ccwrap input{
  flex:1 1 auto !important; min-width:0 !important; width:auto !important;
  height:100% !important;
  border:none !important; border-radius:0 !important; background:transparent !important;
}
#atc-booking .atc-ccwrap input:focus{ border-color:transparent !important; }
