/* booking-widget.css (CLEAN) */

/* -----------------------------
   Base modal + overlay
------------------------------ */
.bw { position: fixed; inset: 0; z-index: 99999; display: none; }
.bw.is-open { display: block; }
.bw__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }

.bw, .bw * { box-sizing: border-box; }

.bw__modal{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);

  width: min(1260px, 96vw);
  height: min(720px, 92vh);

  background: #fff;
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
  overflow: hidden;

  display: grid;
  grid-template-rows: auto 1fr; /* stepper + content */
}

/* Close button (single definition) */
.bw__close{
  position: absolute;
  right: 14px;
  top: 10px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;

  font-size: 0; /* hide any text */
  display: flex;
  align-items: center;
  justify-content: center;
}
.bw__close:hover{ background: rgba(0,0,0,.06); }
.bw__close::before{
  content: "×";
  font-size: 32px;
  line-height: 1;
}

/* Back button */
.bw__back{
  position: absolute;
  left: 14px;
  top: 10px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.bw__back:hover{ background: rgba(0,0,0,.06); }
.bw__back.is-hidden{ display: none; }

/* -----------------------------
   Stepper
------------------------------ */
.bw__steps{
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 18px 70px 8px; /* room for back/close */
  user-select: none;
}

.bw__step{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  color: #111;
  opacity: .85;
  white-space: nowrap;
}

.bw__stepDot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #111;
  flex: 0 0 auto;
}

.bw__step.is-active{
  color: #2f78b7;
  opacity: 1;
  font-weight: 700;
  position: relative;
}
.bw__step.is-active .bw__stepDot{ background: #2f78b7; }
.bw__step.is-active::after{
  content: "";
  position: absolute;
  left: 18px;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: #2f78b7;
  opacity: .9;
}

.bw__step.is-clickable{ cursor: pointer; }
.bw__step[aria-disabled="true"]{ opacity: .55; }
.bw__step.is-visited .bw__stepDot{ opacity: 1; }

/* -----------------------------
   Screens wrapper
------------------------------ */
.bw__screenWrap{
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.bw__screen{ display: none; height: 100%; padding: 10px 26px 26px; }
.bw__screen.is-active{ display: block; }

/* -----------------------------
   Intro
------------------------------ */
.bwIntro{
  height: 100%;
  display: grid;
  place-items: center;
  gap: 22px;
}
.bwIntro__title{
  font-family: "Knewave", system-ui, sans-serif;
  font-size: clamp(42px, 5vw, 64px);
  margin: 0;
}

/* -----------------------------
   Shared 2-col layout
------------------------------ */
.bwGrid{
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.bwLeft,
.bwRight{
  display: flex;
  justify-content: center;
  align-items: center;
}

/* -----------------------------
   Buttons
------------------------------ */
.bwBtn{
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  font-family: system-ui, sans-serif;
  font-weight: 800;
}
.bwBtn--primary{ background: #2f78b7; color: #fff; }
.bwBtn--xl{
  width: min(520px, 90%);
  height: 74px;
  font-size: 26px;
  letter-spacing: .2px;
  box-shadow: 0 18px 44px rgba(47,120,183,.18);
}

/* -----------------------------
   Time card
------------------------------ */
.bwTimeCard{
  width: min(520px, 92%);
  background: #f2f9ff;
  border-radius: 18px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.bwTimeCard__col{ display: grid; gap: 10px; align-content: start; }

.bwLabel{
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #0b0b0b;
}

.bwInput{
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 0;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  padding: 0 12px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  outline: none;
}
.bwInput:focus{ outline: 2px solid rgba(47,120,183,.55); }

/* soft inputs (personal info) */
.bwInput--soft{
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
}
.bwStack{ display: grid; gap: 14px; }

/* -----------------------------
   Preview panel
------------------------------ */
.bwPreview{
  width: min(560px, 92%);
  display: grid;
  gap: 18px;
  justify-items: center;
}
.bwPreview__img{
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 18px;
}

/* Step 3: stable aspect ratio */
.bw__screen[data-screen="3"] .bwPreview{
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: flex-start;
  align-items: center;
}
.bw__screen[data-screen="3"] .bwPreview__img{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(360px, 42vh);
  object-fit: cover;
  border-radius: 18px;
  display: block;
}
.bw__screen[data-screen="3"] .bwPreview .bwBtn{ margin-top: auto; }

/* -----------------------------
   Car selection step
------------------------------ */
.bwCarStep{
  height: 100%;
  display: grid;
  align-items: center;
  padding: 0 12px;
}

/* Slider cards */
#bwCarTrack .carSlider__item { flex: 0 0 320px; }
#bwCarTrack .carCard__body { min-height: 210px; }
#bwCarTrack .carCard__btn { height: 52px; font-size: 18px; }

/* -----------------------------
   Personal info layout
------------------------------ */
.bwFormCols{
  width: min(720px, 96%);
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 40px;
}
.bwH3{
  font-family: system-ui, sans-serif;
  font-size: 28px;
  margin: 0 0 14px;
}

/* =============================
   CONFIRMATION (FINAL CLEAN)
============================= */
.bw__screen[data-screen="4"]{
  height: 100%;
  padding: 0;
}

.bw__screen[data-screen="4"] .bwConfirm{
  width: 100%;
  height: 100%;
  margin: 0;

  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.12);

  display: grid;
  grid-template-rows: auto 1fr auto;
}

.bw__screen[data-screen="4"] .bwConfirm__header{
  background: #a9ddf2;
  color: #fff;
  text-align: center;
  font-family: "Knewave", system-ui, sans-serif;
  font-size: clamp(28px, 2.6vw, 40px);
  padding: 18px 16px;
}

.bw__screen[data-screen="4"] .bwConfirm__title{
  display: none !important;
}

.bw__screen[data-screen="4"] .bwConfirm__body{
  background: #fff;
  min-height: 0;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 34px;
}

.bw__screen[data-screen="4"] .bwConfirmGrid{
  width: 100%;
  max-width: 980px;

  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: center;
}

.bwConfirmLeft{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.bwBlock{ background: transparent; border: 0; padding: 0; border-radius: 0; }
.bwDivider{ height: 1px; background: rgba(0,0,0,.14); opacity: .35; margin: 0; }

.bwConfirm__colTitle{
  font-family: system-ui, sans-serif;
  font-weight: 900;
  margin: 0 0 10px;
}

.bwConfirm__text{
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  opacity: .78;
  white-space: pre-line;
}

.bwConfirmRight{
  display: flex;
  justify-content: center;
  align-items: center;
}

.bwTicketWrap{
  width: 100%;
  max-width: 340px;
  padding: 16px 0;
}

.bw__screen[data-screen="4"] .bwConfirm__footer{
  background: #eadf93;
  color: rgba(255,255,255,.92);
  text-align: center;
  padding: 12px 14px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
}

/* =============================
   RECEIPT (ticket look)
============================= */
.bwReceipt{
  position: relative;
  margin: 0;
  padding: 10px 12px 10px;

  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;

  box-shadow:
    0 16px 36px rgba(0,0,0,.12),
    0 2px 0 rgba(255,255,255,.75) inset;

  background:
    radial-gradient(circle at 0 28px, transparent 0 10px, #ffffff 11px) left top / 100% 100% no-repeat,
    radial-gradient(circle at 100% 28px, transparent 0 10px, #ffffff 11px) left top / 100% 100% no-repeat,
    linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%),
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,.012),
      rgba(0,0,0,.012) 1px,
      transparent 1px,
      transparent 3px
    );

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.bwReceipt::before{
  content:"";
  position:absolute;
  left: 10px;
  right: 10px;
  top: 28px;
  border-top: 1px dashed rgba(0,0,0,.20);
  opacity: .9;
}

.bwReceipt__row{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.bwReceipt__label{ opacity: .78; font-size: 12.5px; line-height: 1.3; }
.bwReceipt__amount{ font-weight: 900; font-size: 12.5px; letter-spacing: .2px; white-space: nowrap; }

.bwReceipt__total{
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.14);
  font-weight: 900;
  font-size: 13px;
}

.bwReceipt__deposit{
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(47,120,183,.08);
  border: 1px solid rgba(47,120,183,.18);
  font-family: system-ui, sans-serif;
  font-weight: 800;
  opacity: 1;
}

.bwReceipt__grand{
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,.18);
  font-weight: 900;
  font-size: 13px;
}

/* =============================
   RESPONSIVE
============================= */

/* <= 980px */
@media (max-width: 980px){
  .bwGrid{
    grid-template-columns: 1fr;
    align-items: start;
  }

  .bwFormCols{ grid-template-columns: 1fr; }

  /* Stepper can wrap on tablet */
  .bw__steps{
    gap: 16px;
    flex-wrap: wrap;
  }

  /* Confirmation stacks */
  .bw__screen[data-screen="4"] .bwConfirm__body{
    overflow: auto;
    align-items: flex-start;
    padding: 16px 16px;
  }
  .bw__screen[data-screen="4"] .bwConfirmGrid{
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    max-width: 720px;
  }
  .bwTicketWrap{
    max-width: 420px;
    padding: 0;
  }
}

/* <= 720px (phones) */
@media (max-width: 720px){
  .bw__modal{
    top: auto;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(720px, 96vw);
    height: min(92vh, 860px);
    border-radius: 18px;
  }

  .bw__steps{
    padding: 14px 16px 8px;
    gap: 12px;
  }

  .bw__step{ font-size: 13px; gap: 8px; }
  .bw__screen{ padding: 10px 14px 16px; }

  .bwTimeCard{
    width: min(520px, 100%);
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .bwLabel{ font-size: 16px; }

  .bwBtn--xl{
    width: min(520px, 100%);
    height: 56px;
    font-size: 18px;
  }

  .bwPreview{ width: min(560px, 100%); gap: 14px; }
  .bwPreview__img{ height: 200px; border-radius: 16px; }

  #bwCarTrack .carSlider__item { flex: 0 0 260px; }

  .bwReceipt{ padding: 12px; border-radius: 14px; }
  .bwReceipt::before{ left: 10px; right: 10px; }
}

/* <= 520px (very small phones) */
@media (max-width: 520px){
  .bw__back{ left: 10px; top: 10px; width: 44px; height: 44px; border-radius: 12px; }
  .bw__close{ right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 12px; }

  /* Keep stepper stable: no centering that clashes with overflow */
  .bw__steps{
    padding-right: 64px; /* reserve space for close */
    padding-left: 64px;  /* reserve space for back */
    justify-content: center;
  }

  .bwIntro{ padding: 0 16px; gap: 18px; }
  .bwIntro__title{
    max-width: 16ch;
    text-align: center;
    line-height: 1.05;
    font-size: clamp(26px, 9vw, 40px);
    margin: 0;
    white-space: normal;
    margin-inline: auto;
  }
}

/* -----------------------------
   Stepper – mobile: active label only (OLD LOOK)
------------------------------ */
@media (max-width: 520px){

  /* 1 rij houden, ruimte voor back + close */
  .bw__steps{
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    padding: 12px 64px 8px; /* 64px links + rechts reserve */
    overflow: hidden;
  }

  /* compacte steps */
  .bw__step{
    font-size: 13px;
    gap: 8px;
    white-space: nowrap;
  }

  /* labels standaard verbergen */
  .bw__stepLabel{
    display: none;
  }

  /* alleen actieve stap toont label + pill */
  .bw__step.is-active{
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(47,120,183,.08);
  }
  .bw__step.is-active .bw__stepLabel{
    display: inline;
  }

  /* underline weg op mobiel (zoals je oude screenshot) */
  .bw__step.is-active::after{
    display: none;
  }

  /* dots iets groter */
  .bw__stepDot{
    width: 11px;
    height: 11px;
  }
}/* -----------------------------
   Stepper – mobile: active label only (OLD LOOK)
------------------------------ */
@media (max-width: 520px){

  /* 1 rij houden, ruimte voor back + close */
  .bw__steps{
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    padding: 12px 64px 8px; /* 64px links + rechts reserve */
    overflow: hidden;
  }

  /* compacte steps */
  .bw__step{
    font-size: 13px;
    gap: 8px;
    white-space: nowrap;
  }

  /* labels standaard verbergen */
  .bw__stepLabel{
    display: none;
  }

  /* alleen actieve stap toont label + pill */
  .bw__step.is-active{
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(47,120,183,.08);
  }
  .bw__step.is-active .bw__stepLabel{
    display: inline;
  }

  /* underline weg op mobiel (zoals je oude screenshot) */
  .bw__step.is-active::after{
    display: none;
  }

  /* dots iets groter */
  .bw__stepDot{
    width: 11px;
    height: 11px;
  }
}

body.bw-lock{
  overflow: hidden !important;
  touch-action: none !important;
}

/* Move car slider arrows slightly inward */
.carSlider__arrow--left {
  left: 12px !important;
}

.carSlider__arrow--right {
  right: 12px !important;
}

.bwInput--invalid {
  outline: 2px solid #dc3545;
  outline-offset: 2px;
}

.bwFieldError {
  margin-top: 6px;
  font-size: 12px;
  color: #dc3545;
}

@media (max-height: 820px){
  /* body mag scrollen i.p.v. afkappen */
  .bw__screen[data-screen="4"] .bwConfirm__body{
    overflow: auto;
    align-items: flex-start;      /* niet meer verticaal centreren */
    padding: 14px 18px;           /* iets compacter */
  }

  /* grid mag bovenaan beginnen */
  .bw__screen[data-screen="4"] .bwConfirmGrid{
    align-items: start;
    gap: 28px;                    /* compacter */
  }

  /* rechterkolom: laat ticket meeschalen en indien nodig intern scrollen */
  .bwConfirmRight{
    align-items: stretch;
  }
  .bwTicketWrap{
    max-height: 100%;
    overflow: auto;
    padding: 0;
  }
}
