/* A Beto Life — live booking widget
   Uses the site's existing tokens: --brand-red, --light-red, --brand-white,
   --button-radius, --card-radius. Oswald is already loaded globally. */

#next-opening {
  display: none;
  margin: 0 auto 1rem;
  padding: .4rem 1.1rem;
  border: 1px solid var(--brand-red);
  border-radius: var(--button-radius);
  color: var(--brand-red);
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  width: fit-content;
}

#live-booking {
  max-width: 46rem;
  margin: 0 auto;
  text-align: left;
}

.bk-step { margin-bottom: 2.25rem; }

.bk-step-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.bk-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--light-red), var(--brand-red));
  color: var(--brand-white);
  font-weight: 600;
  font-size: 1rem;
  flex: none;
}
.bk-step-label {
  font-size: 1.35rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-black);
}

/* Step 1: services */
.bk-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: .75rem;
}
.bk-service {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .9rem 1rem;
  background: #fff;
  border: 2px solid rgba(88, 0, 0, .25);
  border-radius: var(--card-radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.bk-service:hover { border-color: var(--light-red); transform: translateY(-2px); }
.bk-service.is-selected {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px var(--brand-red) inset;
}
.bk-service-name { font-size: 1.1rem; color: var(--brand-black); line-height: 1.3; }
.bk-service-meta { font-size: .95rem; color: var(--light-red); letter-spacing: .5px; }

/* Step 2: day picker */
.bk-days {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: thin;
}
.bk-day {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  min-width: 4.2rem;
  padding: .6rem .5rem;
  background: #fff;
  border: 2px solid rgba(88, 0, 0, .25);
  border-radius: var(--card-radius);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s;
}
.bk-day:hover { border-color: var(--light-red); }
.bk-day.is-selected {
  background: linear-gradient(180deg, var(--light-red), var(--brand-red));
  border-color: var(--brand-red);
}
.bk-day.is-selected .bk-day-dow,
.bk-day.is-selected .bk-day-num,
.bk-day.is-selected .bk-day-mon { color: var(--brand-white); }
.bk-day-dow { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--light-red); }
.bk-day-num { font-size: 1.4rem; font-weight: 600; color: var(--brand-black); line-height: 1; }
.bk-day-mon { font-size: .8rem; color: var(--brand-black); }

/* Step 3: time slots */
.bk-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: .5rem;
}
.bk-time {
  padding: .55rem .25rem;
  background: #fff;
  border: 2px solid rgba(88, 0, 0, .25);
  border-radius: var(--button-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  color: var(--brand-black);
  transition: border-color .2s, background .2s, color .2s;
}
.bk-time:hover { border-color: var(--light-red); }
.bk-time.is-selected {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: var(--brand-white);
}

/* Step 4: form */
.bk-summary {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--brand-black);
}
.bk-form .bk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.bk-field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }
.bk-field span {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--light-red);
}
.bk-field input,
.bk-field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: .6rem .75rem;
  border: 2px solid rgba(88, 0, 0, .25);
  border-radius: var(--card-radius);
  background: #fff;
  color: var(--brand-black);
}
.bk-field input:focus,
.bk-field textarea:focus {
  outline: none;
  border-color: var(--brand-red);
}
.bk-hp { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

.bk-error { color: #a30000; min-height: 1.25rem; margin: .25rem 0; }
.bk-note { font-size: .95rem; color: #555; }

.bk-confirm {
  background: linear-gradient(90deg, var(--light-red), var(--brand-red));
  color: var(--brand-white);
  border: none;
  cursor: pointer;
  padding: .9rem 2.5rem;
  font-size: 1.25rem;
  font-family: inherit;
}
.bk-confirm:disabled { opacity: .6; cursor: wait; }

/* Success */
.bk-success {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 2px solid var(--brand-red);
  border-radius: var(--card-radius);
  background: #fff;
}
.bk-success-mark {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--light-red), var(--brand-red));
  color: var(--brand-white);
  font-size: 1.75rem;
}
.bk-success h4 { font-size: 1.75rem; margin-bottom: .5rem; }
.bk-again {
  margin-top: 1.25rem;
  background: transparent;
  color: var(--brand-red);
  border: 2px solid var(--brand-red);
  cursor: pointer;
  font-family: inherit;
}

/* When the live widget is running, the Setmore button becomes the quiet backup */
.bk-fallback-secondary { margin-top: 2rem; opacity: .85; }
.bk-fallback-secondary::before {
  content: "Prefer the Setmore app? Book there instead:";
  display: block;
  font-size: .95rem;
  color: #555;
  margin-bottom: .5rem;
}

@media (max-width: 600px) {
  .bk-form .bk-row { grid-template-columns: 1fr; }
  .bk-step-label { font-size: 1.15rem; }
}

/* ── Live (feed-driven) service cards: CSS hover reveal ──
   Webflow's interaction engine only binds to elements present at page load,
   so generated .sv-live cards replicate the same hover effect in CSS.
   Desktop only, matching the original behavior (mobile shows text statically
   via the existing responsive rules). */
@media (min-width: 992px) {
  .c-card-attendant.sv-live .hover-background {
    transition: opacity .5s ease;
  }
  .c-card-attendant.sv-live .l-card-text.u-hidden {
    display: block;
    transform: scale(0);
    opacity: 0;
    transition: transform .5s ease-in-out, opacity .4s ease;
    pointer-events: none;
  }
  .c-card-attendant.sv-live:hover .hover-background {
    opacity: 1;
  }
  .c-card-attendant.sv-live:hover .l-card-text.u-hidden {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Service cards: no hover lift (was translate -40px, which moved the
   Book Here button away from the cursor). Keep the shadow as depth cue. ── */
.c-card-attendant.u-text-shadow:hover,
.c-card-attendant.bg-image-1.u-text-shadow:hover,
.c-card-attendant.bg-image-2.u-text-shadow:hover,
.c-card-attendant.bg-image-3:hover {
  transform: none !important;
  box-shadow: 10px 16px 22px #00000045 !important;
}

/* ── Services grid: 2×2 on tablet/desktop (4 live services), 1-col on
   mobile stays as-is from the base styles. Loaded after styles.css so
   these override the 3-column rules. ── */
@media (min-width: 768px) {
  .l-3ol.services {
    grid-template-columns: repeat(2, 1fr);
    max-width: 62rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── Mobile overflow fix ──
   #live-booking is a grid item; without min-width:0 the 14-day strip's
   min-content width (≈736px) expands it past the viewport instead of
   triggering the strip's own horizontal scrollbar. Pin everything to the
   viewport so .bk-days scrolls internally as designed. */
#live-booking {
  width: 100%;
  min-width: 0;
  max-width: min(46rem, 100%);
}
.bk-step,
.bk-step-head,
.bk-services,
.bk-days,
.bk-times,
.bk-form,
.bk-summary,
.bk-success {
  min-width: 0;
  max-width: 100%;
}
.bk-days {
  -webkit-overflow-scrolling: touch;  /* momentum scroll on iOS */
}
