/*
 * Website enquiry -> visit booking panel.
 * Restrained EK warm graphite / cream / gold glass. Reuses the site's own
 * tokens where present (falls back to sane defaults so this file also works
 * stand-alone). One compact panel, one primary action per step, no nested
 * cards. Responsive at 1440 / 390 / 320. Keeps the fixed dock/launcher clear
 * of the primary action via a generous safe-area-aware bottom margin.
 */

.ekwb {
  --ekwb-graphite: var(--ek-graphite, #2b2a28);
  --ekwb-graphite-soft: var(--ek-graphite-soft, #43413d);
  --ekwb-cream: var(--ek-cream, #f7f3ea);
  --ekwb-cream-deep: var(--ek-cream-deep, #ece5d4);
  --ekwb-gold: var(--ek-gold, #b6892f);
  --ekwb-gold-soft: var(--ek-gold-soft, rgba(182, 137, 47, 0.35));
  --ekwb-danger: var(--ek-danger, #8a3324);
  --ekwb-radius: 14px;
  --ekwb-gap: 14px;
  --ekwb-hit: 44px;
  /* Bottom clearance so a fixed nav/agent launcher can never cover the
   * primary action. Respects devices with a safe-area inset. */
  --ekwb-dock-safe-bottom: calc(88px + env(safe-area-inset-bottom, 0px));

  position: relative;
  box-sizing: border-box;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px calc(var(--ekwb-dock-safe-bottom));
  border-radius: var(--ekwb-radius);
  border: 1px solid var(--ekwb-gold-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 40%),
    var(--ekwb-cream);
  backdrop-filter: saturate(120%) blur(6px);
  color: var(--ekwb-graphite);
  font: 15px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif;
}

.ekwb *,
.ekwb *::before,
.ekwb *::after {
  box-sizing: border-box;
}

/* Visually-hidden but still announced live region. */
.ekwb__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ekwb__body {
  display: flex;
  flex-direction: column;
  gap: var(--ekwb-gap);
  /* Gentle, stable-height transitions between steps. */
  transition: opacity 180ms ease, transform 180ms ease;
}

.ekwb__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ekwb__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ekwb-gold);
  text-transform: uppercase;
}

.ekwb__body h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  color: var(--ekwb-graphite);
}

.ekwb__body h2 {
  margin: 0 0 2px;
  font-size: 15px;
  color: var(--ekwb-graphite-soft);
}

.ekwb__status {
  margin: 0;
  color: var(--ekwb-graphite-soft);
}

.ekwb__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: calc(var(--ekwb-radius) - 4px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(43, 42, 40, 0.08);
}

.ekwb__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--ekwb-graphite-soft);
}

.ekwb__input,
.ekwb__select {
  min-height: var(--ekwb-hit);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(43, 42, 40, 0.2);
  background: var(--ekwb-cream);
  color: var(--ekwb-graphite);
  font: inherit;
}

.ekwb__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: var(--ekwb-hit);
  font-size: 13px;
  color: var(--ekwb-graphite);
}

.ekwb__checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--ekwb-gold);
}

.ekwb__field-error {
  margin: 0;
  font-size: 12px;
  color: var(--ekwb-danger);
}

.ekwb__notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ekwb-cream-deep);
  color: var(--ekwb-graphite);
  font-size: 13px;
}

.ekwb__hint {
  margin: 0;
  font-size: 12px;
  color: var(--ekwb-graphite-soft);
}

.ekwb__receipt-line {
  margin: 0;
  font-size: 15px;
}

/* Buttons: 44px minimum hit target everywhere, one gold focus treatment. */
.ekwb__button {
  min-height: var(--ekwb-hit);
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(43, 42, 40, 0.18);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ekwb-graphite);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ekwb__button--primary {
  border-color: var(--ekwb-gold);
  background: var(--ekwb-gold);
  color: var(--ekwb-cream);
}

.ekwb__button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ekwb__confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* One visible, consistent focus treatment across every interactive control. */
.ekwb a:focus-visible,
.ekwb button:focus-visible,
.ekwb input:focus-visible,
.ekwb select:focus-visible,
.ekwb label:focus-within {
  outline: 3px solid var(--ekwb-gold);
  outline-offset: 2px;
}

/* Slot cards: up to three on a wide screen. */
.ekwb__slot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ekwb__slot-list li {
  position: relative;
}

.ekwb__slot-list input[type="radio"] {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 20px;
  height: 20px;
  accent-color: var(--ekwb-gold);
}

.ekwb__slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: var(--ekwb-hit);
  padding: 12px 12px 12px 40px;
  border-radius: 10px;
  border: 1px solid rgba(43, 42, 40, 0.16);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.ekwb__slot-list input[type="radio"]:checked + .ekwb__slot,
.ekwb__slot-list input[type="radio"]:focus-visible + .ekwb__slot {
  border-color: var(--ekwb-gold);
  box-shadow: 0 0 0 2px var(--ekwb-gold-soft);
}

/* ---- 390px: single column, still 44px targets, still dock-safe ---- */
@media (max-width: 390px) {
  .ekwb {
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 0;
  }

  .ekwb__slot-list {
    grid-template-columns: 1fr;
  }

  .ekwb__confirm-actions {
    flex-direction: column;
  }

  .ekwb__confirm-actions .ekwb__button {
    width: 100%;
  }
}

/* ---- 320px: same single-column layout, tighter spacing ---- */
@media (max-width: 320px) {
  .ekwb {
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }

  .ekwb__slot-list {
    grid-template-columns: 1fr;
  }

  .ekwb__section {
    padding: 10px;
  }
}

/* ---- Reduced motion: no transform/opacity animation, instant states ---- */
@media (prefers-reduced-motion: reduce) {
  .ekwb,
  .ekwb * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
