/* ==========================================================================
   Booking widget. Uses the tokens already defined in site.css.
   ========================================================================== */

.bk {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 44px 110px -60px var(--glow);
  overflow: hidden;
  min-height: 560px;
  /* clears the fixed nav when the widget scrolls itself into view */
  scroll-margin-top: 110px;
}

.bk-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: stretch;
}

.bk-grid.has-times {
  grid-template-columns: 280px 1fr 260px;
}

/* ---------- left pane ---------- */

.bk-aside {
  padding: 34px 30px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bk-host {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bk-host img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #0b0d12;
}

.bk-host span {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--zinc-500);
}

.bk-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.bk-meta {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 2px;
}

.bk-meta li {
  list-style: none;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--zinc-300);
  font-size: 0.92rem;
  line-height: 1.45;
}

.bk-meta svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: var(--blue-2);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-blurb {
  color: var(--zinc-400);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- main pane ---------- */

.bk-main {
  padding: 34px 30px;
  min-width: 0;
}

.bk-h {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 20px;
}

/* month header */

.bk-monthbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.bk-month {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  color: #fff;
}

.bk-nav {
  display: flex;
  gap: 6px;
}

.bk-arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--zinc-300);
  cursor: pointer;
  transition: border-color 0.3s var(--e2), background 0.3s var(--e2), color 0.3s var(--e2);
}

.bk-arrow svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-arrow:hover:not(:disabled) {
  border-color: var(--line-2);
  background: rgba(59, 109, 255, 0.08);
  color: #fff;
}

.bk-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* day grid */

.bk-cal {
  max-width: 430px;
}

.bk-dow,
.bk-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.bk-dow {
  margin-bottom: 8px;
}

.bk-dow span {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--zinc-500);
  padding-bottom: 4px;
}

.bk-day {
  aspect-ratio: 1;
  max-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  color: var(--zinc-300);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: background 0.28s var(--e2), border-color 0.28s var(--e2),
    color 0.28s var(--e2), transform 0.28s var(--e2);
}

.bk-day:hover:not(:disabled) {
  background: rgba(59, 109, 255, 0.12);
  border-color: var(--line-2);
  color: #fff;
  transform: translateY(-1px);
}

.bk-day[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 8px 22px -10px var(--glow);
}

.bk-day:disabled {
  background: none;
  color: var(--zinc-800);
  cursor: default;
}

.bk-day.is-empty {
  background: none;
  border: 0;
  cursor: default;
}

.bk-day .dot {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue-2);
}

.bk-day[aria-pressed='true'] .dot {
  background: #fff;
}

/* timezone picker */

.bk-tz {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bk-tz label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--zinc-500);
  margin-bottom: 8px;
}

.bk-tz select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #0a0c11;
  color: var(--zinc-300);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
}

.bk-tz select:focus {
  outline: none;
  border-color: var(--line-2);
}

/* ---------- times column ---------- */

.bk-times {
  border-left: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bk-times-h {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  margin-bottom: 4px;
}

.bk-times-sub {
  font-size: 0.76rem;
  color: var(--zinc-500);
  margin-bottom: 16px;
}

.bk-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 420px;
  padding-right: 4px;
}

.bk-slots::-webkit-scrollbar {
  width: 5px;
}

.bk-slots::-webkit-scrollbar-thumb {
  background: var(--zinc-800);
  border-radius: 4px;
}

.bk-slot {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.28s var(--e2), background 0.28s var(--e2),
    transform 0.28s var(--e2);
}

.bk-slot:hover {
  border-color: var(--line-2);
  background: rgba(59, 109, 255, 0.1);
  transform: translateY(-1px);
}

/* ---------- form ---------- */

.bk-form {
  padding: 34px 30px;
  max-width: 620px;
}

.bk-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  color: var(--zinc-400);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.3s var(--e2);
}

.bk-back:hover {
  color: var(--blue-2);
}

.bk-back svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-chosen {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: rgba(59, 109, 255, 0.07);
  margin-bottom: 24px;
}

.bk-chosen svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--blue-2);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-chosen b {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.bk-chosen small {
  display: block;
  color: var(--zinc-400);
  font-size: 0.78rem;
  margin-top: 1px;
}

.bk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.bk-field {
  margin-bottom: 15px;
}

/* direct child only, so the radio pills below do not inherit the caps */
.bk-field > label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--zinc-400);
  margin-bottom: 7px;
}

.bk-field .req {
  color: var(--blue-2);
}

.bk-field input,
.bk-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.94rem;
  transition: border-color 0.3s var(--e2), background 0.3s var(--e2);
}

.bk-field textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}

.bk-field input::placeholder,
.bk-field textarea::placeholder {
  color: var(--zinc-500);
}

.bk-field input:focus,
.bk-field textarea:focus {
  outline: none;
  border-color: var(--line-2);
  background: rgba(59, 109, 255, 0.05);
}

.bk-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.bk-choice {
  position: relative;
}

.bk-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bk-choice span {
  display: block;
  text-transform: none;
  letter-spacing: normal;
  padding: 10px 17px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--zinc-300);
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.28s var(--e2), background 0.28s var(--e2),
    color 0.28s var(--e2);
}

.bk-choice span:hover {
  border-color: var(--line-2);
  color: #fff;
}

.bk-choice input:checked + span {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 8px 22px -12px var(--glow);
}

.bk-choice input:focus-visible + span {
  outline: 2px solid var(--blue-2);
  outline-offset: 2px;
}

.bk-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bk-submit {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

.bk-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.bk-terms {
  margin-top: 14px;
  color: var(--zinc-500);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ---------- states ---------- */

.bk-msg {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid;
}

.bk-msg.err {
  border-color: rgba(255, 105, 105, 0.35);
  background: rgba(255, 80, 80, 0.07);
  color: #ffb4b4;
}

.bk-msg ul {
  margin: 6px 0 0 16px;
}

.bk-empty,
.bk-loading {
  color: var(--zinc-500);
  font-size: 0.88rem;
  padding: 20px 0;
  text-align: center;
}

.bk-spinner {
  width: 22px;
  height: 22px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--blue-2);
  animation: bkspin 0.8s linear infinite;
}

@keyframes bkspin {
  to {
    transform: rotate(360deg);
  }
}

.bk-skeleton {
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: bkshimmer 1.3s linear infinite;
}

@keyframes bkshimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- confirmation ---------- */

.bk-done {
  padding: 60px 30px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.bk-tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(59, 109, 255, 0.1);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 44px -8px var(--glow);
}

.bk-tick svg {
  width: 28px;
  height: 28px;
  stroke: var(--blue-2);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-done h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}

.bk-done p {
  color: var(--zinc-400);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.bk-done .when {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: #fff;
  font-size: 1.05rem;
}

.bk-done .btn {
  margin-top: 22px;
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .bk-grid,
  .bk-grid.has-times {
    grid-template-columns: 1fr;
  }

  .bk-aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 26px 22px;
  }

  .bk-blurb {
    margin-top: 4px;
  }

  .bk-main {
    padding: 26px 22px;
  }

  .bk-times {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 22px;
  }

  .bk-slots {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .bk-form {
    padding: 26px 22px;
  }
}

@media (max-width: 520px) {
  .bk {
    border-radius: 18px;
    min-height: 0;
  }

  .bk-title {
    font-size: 1.3rem;
  }

  .bk-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bk-day {
    min-height: 36px;
    font-size: 0.84rem;
    border-radius: 9px;
  }

  .bk-dow span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .bk-days,
  .bk-dow {
    gap: 4px;
  }

  .bk-done {
    padding: 44px 22px;
  }
}

/* fallback iframe, only shown when the API is unreachable */
.bk-fallback {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-2);
}

.bk-fallback iframe {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
}

@media (max-width: 900px) {
  .bk-fallback iframe {
    height: 740px;
  }
}

@media (max-width: 520px) {
  .bk-fallback iframe {
    height: 780px;
  }
}
