/* ===============================
   Jetstokki Flight Request – v2 UI Polish (clean)
   =============================== */

.jetstokki-premium { background: transparent; }

.jetstokki-flight-root .jetstokki-form{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.jetstokki-flight-root .jetstokki-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

@media (max-width:768px){
  .jetstokki-flight-root .jetstokki-row{ grid-template-columns:1fr; }
  .jetstokki-flight-root .jetstokki-buttons{ grid-template-columns:1fr; }
}

/* ---------- Base look (FORCE override Divi) ---------- */
.jetstokki-flight-root .jetstokki-form input,
.jetstokki-flight-root .jetstokki-form select{
  width:100%;
  box-sizing:border-box;
  border:none !important;
  outline:none !important;
  border-radius:14px;
  padding:16px 18px;
  background:#f5f7fa !important;
  font-size:17px;
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
  box-shadow:none !important;
  line-height:1.2;
  min-height:52px;              /* fixes “tiny line” on mobile */
}

/* Placeholder */
.jetstokki-flight-root .jetstokki-form input::placeholder{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
  opacity:1 !important;
}

/* Focus */
.jetstokki-flight-root .jetstokki-form input:focus,
.jetstokki-flight-root .jetstokki-form select:focus{
  background:#fff !important;
  box-shadow:0 0 0 2px rgba(2,48,71,.18) !important;
}

/* Select */
.jetstokki-flight-root .jetstokki-form select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  cursor:pointer;
}
.jetstokki-flight-root .jetstokki-form select:invalid{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}

/* Date/Time placeholder-grey until chosen */
.jetstokki-flight-root .jetstokki-form input[type="date"],
.jetstokki-flight-root .jetstokki-form input[type="time"]{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}
.jetstokki-flight-root .jetstokki-form input[type="date"]:valid,
.jetstokki-flight-root .jetstokki-form input[type="time"]:valid{
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
}
.jetstokki-flight-root .jetstokki-form input[type="date"]::-webkit-datetime-edit,
.jetstokki-flight-root .jetstokki-form input[type="time"]::-webkit-datetime-edit{
  color:inherit !important;
}

/* Mobile: make date/time pickers feel normal (bigger tap area) */
@media (max-width:768px){
  .jetstokki-flight-root .jetstokki-form input[type="date"],
  .jetstokki-flight-root .jetstokki-form input[type="time"]{
    min-height:56px;
    font-size:16px;
    padding:16px 18px;
  }
}

/* ---------- Legs spacing ---------- */
.jetstokki-flight-root .jetstokki-leg + .jetstokki-leg{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(15,23,42,.08);
}

/* spacing between the two rows inside one leg */
.jetstokki-flight-root .jetstokki-leg .jetstokki-row + .jetstokki-row{
  margin-top:18px;
}

/* smaller “leg” fields */
.jetstokki-flight-root .jetstokki-leg input.jetstokki-airport,
.jetstokki-flight-root .jetstokki-leg input[type="date"],
.jetstokki-flight-root .jetstokki-leg input[type="time"]{
  padding:10px 12px;
  font-size:15px;
  min-height:46px;
}

/* ---------- X pinned INSIDE the To field ---------- */
.jetstokki-flight-root .jetstokki-field-to{
  position:relative;
}
.jetstokki-flight-root .jetstokki-field-to input{
  padding-right:56px !important;
}
.jetstokki-flight-root .jetstokki-field-to .jetstokki-leg-remove{
  position:absolute !important;
  right:12px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:34px;
  height:34px;
  border:none;
  border-radius:12px;
  background:#e5e7eb;
  color:#023047;
  font-size:18px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  z-index:50;
}
.jetstokki-flight-root .jetstokki-field-to .jetstokki-leg-remove:hover{
  background:#cbd5e1;
}
/* Never show X on first leg */
.jetstokki-flight-root .jetstokki-leg:first-child .jetstokki-leg-remove{
  display:none !important;
}

/* ---------- Pax + pets row ---------- */
.jetstokki-flight-root .jetstokki-form input[name="pax"]{
  padding:10px 12px;
  font-size:15px;
  min-height:46px;
}
.jetstokki-flight-root .jetstokki-pets{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0;
  padding:0;
  width:100%;
}
.jetstokki-flight-root .jetstokki-pets label{
  margin:0;
  padding:0;
  font-size:15px;
  color:#475569;
  cursor:pointer;
}
.jetstokki-flight-root .jetstokki-pets input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
  cursor:pointer;
  accent-color:#023047;
  flex:0 0 auto;
}

/* ---------- Buttons ---------- */
.jetstokki-flight-root .jetstokki-form button{ cursor:pointer; }

.jetstokki-flight-root .jetstokki-buttons{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:18px;
}
.jetstokki-flight-root .jetstokki-buttons button{
  height:52px;
  border:none;
  border-radius:14px;
  font-weight:700;
  letter-spacing:.02em;
  font-size:16px;
  background:#e5e7eb;
  color:#023047;
}
.jetstokki-flight-root .jetstokki-buttons button[data-action="open-contact"]{
  background:#023047;
  color:#fff;
}

/* ---------- Modal ---------- */
.jetstokki-flight-root .jetstokki-modal__overlay{
  position:fixed;
  inset:0;
  background:rgba(2,48,71,.35);
  z-index:99990;
}
.jetstokki-flight-root .jetstokki-modal__card{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(920px, calc(100vw - 32px));
  background:#fff;
  border-radius:18px;
  padding:22px;
  box-shadow:0 28px 70px rgba(0,0,0,.28);
  z-index:99999;
}
/* prevent “glued together” fields in modal */
.jetstokki-flight-root .jetstokki-modal__card .jetstokki-row{
  row-gap:16px;
}

.jetstokki-flight-root .jetstokki-modal__title{
  margin:0 0 14px;
  font-size:22px;
  color:#0f172a;
}
.jetstokki-flight-root .jetstokki-modal__legal{
  margin-top:10px;
  font-size:14px;
  color:#475569;
  text-align:center;
}
.jetstokki-flight-root .jetstokki-modal__actions{
  display:flex;
  gap:12px;
  justify-content:center;
  margin-top:14px;
}
.jetstokki-flight-root .jetstokki-modal__actions button{
  height:44px;
  padding:0 18px;
  border:none;
  border-radius:12px;
  font-weight:700;
  font-size:15px;
}
.jetstokki-flight-root .jetstokki-modal__actions button[data-action="close-contact"]{
  background:#e5e7eb;
  color:#023047;
}
.jetstokki-flight-root .jetstokki-modal__actions button[type="submit"]{
  background:#023047;
  color:#fff;
}

/* ---------- Autocomplete ---------- */
.jetstokki-flight-root .jetstokki-field{ position:relative; }
.jetstokki-flight-root .jetstokki-autocomplete{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  margin-top:6px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(0,0,0,.15);
  z-index:99999;
  max-height:320px;
  overflow:auto;
}
.jetstokki-flight-root .jetstokki-autocomplete > div{
  padding:10px 14px;
  cursor:pointer;
  line-height:1.25;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.jetstokki-flight-root .jetstokki-autocomplete > div:last-child{ border-bottom:none; }
.jetstokki-flight-root .jetstokki-autocomplete > div:hover{ background:#f1f5f9; }

/* ---------- Success (centered inside modal) ---------- */
.jetstokki-flight-root .jetstokki-success{
  text-align:center;
  margin-top:14px;
  color:#16a34a;
  font-weight:700;
}

/* ===============================
   Modal spacing fixes (desktop + mobile)
   =============================== */

/* Make modal rows breathe */
.jetstokki-flight-root .jetstokki-modal__card .jetstokki-row{
  gap:18px !important;
  row-gap:18px !important;
  align-items:stretch;
}

/* Extra spacing between row blocks inside modal */
.jetstokki-flight-root .jetstokki-modal__card .jetstokki-row + .jetstokki-row{
  margin-top:18px !important;
}

/* Prevent “stuck together” rounding artifacts */
.jetstokki-flight-root .jetstokki-modal__card input,
.jetstokki-flight-root .jetstokki-modal__card select{
  display:block;
  margin:0 !important;
  background-clip:padding-box;
}

/* Mobile: modal becomes single-column + proper vertical spacing */
@media (max-width:768px){
  .jetstokki-flight-root .jetstokki-modal__card{
    width:calc(100vw - 24px);
    padding:18px;
    max-height:calc(100vh - 24px);
    overflow:auto;              /* important on iPhone */
    -webkit-overflow-scrolling:touch;
  }

  .jetstokki-flight-root .jetstokki-modal__card .jetstokki-row{
    grid-template-columns:1fr !important;
    gap:14px !important;
    row-gap:14px !important;
  }
}

/* Mobile: date/time inputs must not collapse into a “tiny line” */
@media (max-width:768px){
  .jetstokki-flight-root input[type="date"],
  .jetstokki-flight-root input[type="time"]{
    min-height:48px;
    height:48px;
    line-height:48px;
    padding:0 12px !important;  /* consistent vertical size on iOS */
    -webkit-appearance:none;
    appearance:none;
  }
}