/* booking-widget.css */
.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__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;
}

.bw__close{
  position: absolute;
  right: 14px;
  top: 10px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  font-size: 32px;
  cursor: pointer;
  z-index: 5;
}
.bw__close:hover{ background: rgba(0,0,0,.06); }

/* Stepper */
.bw__steps{
  display: flex;
  gap: 32px;
  justify-content: center;
  padding: 18px 70px 8px;
  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;
}
.bw__stepDot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #111;
}
.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;
}

/* Screens */
.bw__screenWrap{ height: calc(100% - 60px); }
.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 layout */
.bwGrid{
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.bwLeft{ display: flex; justify-content: center; }
.bwRight{ display: flex; justify-content: 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{
  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;
}

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

/* Availability pill inside car cards */
.bwAvailRow{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 12px;
}
.bwAvailDot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
}
.bwAvailDot--ok{ background: #58d13f; }
.bwAvailDot--no{ background: #e34141; }

/* In widget we want Choose/Contact to look like screenshot (full width & squared bottom) */
.bwCardBtnFull{
  height: 58px !important;
  border-radius: 0 0 26px 26px !important;
  font-size: 22px !important;
}

/* Make slider cards bigger like screenshot */
#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 */
.bwConfirm{
  width: min(900px, 96%);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.12);
}
.bwConfirm__header{
  background: #a9ddf2;
  color: #fff;
  text-align: center;
  font-family: "Knewave", system-ui, sans-serif;
  font-size: clamp(30px, 3vw, 42px);
  padding: 22px 18px;
}
.bwConfirm__body{
  background: #fff;
  padding: 26px 26px 18px;
}
.bwConfirm__title{
  text-align: center;
  font-family: system-ui, sans-serif;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 18px;
}
.bwConfirm__cols{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}
.bwConfirm__colTitle{
  font-family: system-ui, sans-serif;
  font-weight: 900;
  margin-bottom: 10px;
}
.bwConfirm__text{
  font-family: system-ui, sans-serif;
  opacity: .75;
  line-height: 1.55;
  font-size: 14px;
  white-space: pre-line;
}
.bwConfirm__footer{
  background: #eadf93;
  color: rgba(255,255,255,.92);
  text-align: center;
  padding: 16px 16px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 980px){
  .bwGrid{ grid-template-columns: 1fr; align-items: start; overflow: auto; }
  .bwPreview__img{ height: 240px; }
  .bwFormCols{ grid-template-columns: 1fr; }
  .bwConfirm__cols{ grid-template-columns: 1fr; }
  .bw__steps{ gap: 16px; flex-wrap: wrap; }
}

/* ---------------------------------------
   BOOKING WIDGET – RESPONSIVE UPGRADE
   Plak onderaan booking-widget.css
---------------------------------------- */

/* Better box sizing everywhere in widget */
.bw, .bw * { box-sizing: border-box; }

/* Modal: allow internal scroll (important on phones) */
.bw__modal{
  display: grid;
  grid-template-rows: auto 1fr; /* steps + screen content */
}

/* Screen wrapper should be scrollable area */
.bw__screenWrap{
  min-height: 0;              /* allows child to shrink in grid */
  overflow: auto;             /* scroll inside modal */
  -webkit-overflow-scrolling: touch;
}

/* Make all inner blocks center by default */
.bwLeft, .bwRight{
  justify-content: center;
  align-items: center;
}

/* Ensure common panels are centered and not wider than viewport */
.bwTimeCard,
.bwPreview,
.bwFormCols,
.bwConfirm{
  margin-inline: auto;
}

/* Prevent inputs from overflowing on small screens */
.bwInput{ width: 100%; }

/* Make images behave on small screens */
.bwPreview__img{
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------
   MOBILE (phones)
---------------------------------------- */
@media (max-width: 720px){

  /* Modal becomes a "bottom sheet" style (much nicer on phone) */
  .bw__modal{
    left: 50%;
    top: auto;
    bottom: 12px;
    transform: translateX(-50%);

    width: min(720px, 96vw);
    height: min(92vh, 860px);
    border-radius: 18px;
  }

  /* Close button easier to tap */
  .bw__close{
    right: 10px;
    top: 10px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 30px;
  }

  /* Stepper: wrap + smaller text */
  .bw__steps{
    padding: 14px 16px 8px;
    gap: 12px;
  }
  .bw__step{
    font-size: 13px;
    gap: 8px;
  }

  /* Screens padding tighter */
  .bw__screen{
    padding: 10px 14px 16px;
  }

  /* Grid stack + center everything */
  .bwGrid{
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  /* Time card: two columns -> one column */
  .bwTimeCard{
    width: min(520px, 100%);
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  /* Labels not huge on phone */
  .bwLabel{ font-size: 16px; }

  /* Buttons full width and centered */
  .bwBtn--xl{
    width: min(520px, 100%);
    height: 56px;
    font-size: 18px;
  }

  /* Preview panel */
  .bwPreview{
    width: min(560px, 100%);
    gap: 14px;
  }
  .bwPreview__img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
  }

  /* Personal info: always stacked and centered */
  .bwFormCols{
    width: min(720px, 100%);
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .bwH3{ font-size: 20px; }

  /* Confirmation: stack */
  .bwConfirm__body{ padding: 18px 16px 14px; }
  .bwConfirm__cols{
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center; /* feels nicer on phone */
  }
  .bwConfirm__colTitle{ margin-bottom: 6px; }
  .bwConfirm__text{ font-size: 13px; }

  /* Car slider arrows: reduce hit area clutter */
  .carSlider__arrow{
    width: 38px;
    height: 38px;
  }

  /* Slider cards smaller so they fit */
  #bwCarTrack .carSlider__item { flex: 0 0 260px; }
}

/* ---------------------------------------
   TABLET range: keep stacked but roomier
---------------------------------------- */
@media (min-width: 721px) and (max-width: 980px){
  .bwGrid{
    grid-template-columns: 1fr;
    align-items: start;
  }
  .bwTimeCard{ grid-template-columns: 1fr; }
  .bwBtn--xl{ height: 64px; font-size: 22px; }
}

/* ---------------------------------------
   FIX 1: Stepper botst met close button
   - op mobiel: alleen actieve stap heeft tekst
   - padding-right maakt ruimte voor X
---------------------------------------- */
@media (max-width: 520px){

  /* ruimte maken voor het kruisje rechts */
  .bw__steps{
    justify-content: flex-start;
    flex-wrap: nowrap;              /* niet meer in 2 regels zoals op screenshot */
    overflow: hidden;
    padding: 12px 64px 8px 16px;    /* <-- 64px reserve voor X */
    gap: 10px;
  }

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

  /* standaard: labels weg (alleen dots zichtbaar) */
  .bw__stepLabel{
    display: none;
  }

  /* actieve stap: label tonen (met klein animatiegevoel) */
  .bw__step.is-active .bw__stepLabel{
    display: inline;
    opacity: 1;
    transform: translateY(0);
  }

  /* subtiele animatie voor label wanneer hij verschijnt */
  .bw__step.is-active .bw__stepLabel{
    animation: bwLabelIn 220ms ease-out both;
  }

  @keyframes bwLabelIn{
    from{ opacity: 0; transform: translateY(2px); }
    to{ opacity: 1; transform: translateY(0); }
  }

  /* dots iets groter zodat het “clean” blijft */
  .bw__stepDot{
    width: 11px;
    height: 11px;
  }

  /* underline (after) minder breed zodat het niet raar uitloopt */
  .bw__step.is-active::after{
    left: 18px;
    right: auto;
    width: 60px;
  }
}


/* ---------------------------------------
   FIX 2: Intro titel centreren + niet breken
---------------------------------------- */
@media (max-width: 520px){
  .bwIntro{
    padding: 0 16px;          /* zodat tekst niet tegen randen plakt */
    gap: 18px;
  }

  .bwIntro__title{
    width: 100%;
    text-align: center;
    white-space: nowrap;      /* <-- niet breken */
    line-height: 1.05;
    font-size: clamp(26px, 9vw, 40px); /* <-- wordt kleiner als nodig */
    margin: 0;
  }
}

/* ---------------------------------------
   Stepper: center dot + label (mobile)
---------------------------------------- */
@media (max-width: 520px){

  /* Stepper area full width, content centered */
  .bw__steps{
    width: 100%;
    justify-content: center;         /* <-- center it */
    padding-left: 16px;
    padding-right: 64px;             /* space for X */
    margin: 0 auto;
  }

  /* Make each step tight */
  .bw__step{
    justify-content: center;
    align-items: center;
  }

  /* Active step looks like centered pill */
  .bw__step.is-active{
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(47,120,183,.08);
  }

  /* Keep the underline off on mobile (optional, looks cleaner) */
  .bw__step.is-active::after{
    display: none;
  }

  /* Slightly more spacing between dots */
  .bw__steps{ gap: 12px; }
}

.bw__close{
  font-size: 0; /* verberg originele × */
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw__close::before{
  content: "×";
  font-size: 32px;
  line-height: 1;
  transform: translateY(0px); /* finetune */
}

.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); }

/* hidden on intro (screen 0) */
.bw__back.is-hidden{ display: none; }

/* mobile tweak */
@media (max-width: 520px){
  .bw__back{ left: 10px; top: 10px; width: 44px; height: 44px; border-radius: 12px; }
}

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