/* The booker: Aerial's own view of the build call's open times, then a name and an email. Times
   always read like "9:30am"; there is no 12/24-hour switch. Bookings go through Cal.com. */

.bk {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 60px 140px -40px rgb(5 9 18 / 0.6);
}

.bk::backdrop {
  background: rgb(7 11 20 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bk[open] {
  animation: bk-in 360ms var(--ease) both;
}

@keyframes bk-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

.bk__panel {
  position: relative;
  outline: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 520px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 20px;
}

.bk__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.bk__close:hover {
  color: var(--ink);
}

/* The call, on the left. */
.bk__about {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 30px 26px;
  border-right: 1px solid var(--line);
  background: #fbfbfa;
}

.bk__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

.bk__brand .mark {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.bk__about h2 {
  margin: 4px 0 6px;
  font-size: 28px;
  line-height: 1.12;
}

.bk__meta {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14.5px;
}

.bk__meta li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bk__meta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk__when {
  margin: 10px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.bk__main {
  min-width: 0;
  overflow-y: auto;
}

.bk__step {
  padding: 30px 30px 28px;
}

/* The month and the day's times. */
.bk__pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 28px;
}

.bk__cal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-right: 44px;
}

.bk__cal header b {
  font-size: 24px;
  font-weight: 300;
}

.bk__cal header span {
  display: flex;
  gap: 6px;
}

.bk__cal header button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.bk__cal header button:disabled {
  opacity: 0.35;
  cursor: default;
}

.bk__weekdays,
.bk__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.bk__weekdays {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.bk__days button {
  aspect-ratio: 1;
  width: 100%;
  max-width: 52px;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #b9c0ca;
  font: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.bk__days button[data-open="true"] {
  background: #eef1f5;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms var(--ease);
}

.bk__days button[data-open="true"]:hover {
  background: #e1e6ed;
}

.bk__days button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.bk__days button[data-today="true"]::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin: 2px auto 0;
  border-radius: 50%;
  background: currentColor;
}

.bk__tz {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.bk__day {
  margin: 0 0 14px;
  padding-top: 6px;
  font-size: 15px;
  font-weight: 500;
}

.bk__slots {
  display: grid;
  gap: 8px;
  max-height: 380px;
  padding-right: 4px;
  overflow-y: auto;
}

.bk__slots button {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease),
    background-color 160ms var(--ease);
}

.bk__slots button:hover {
  border-color: var(--ink);
}

.bk__slots p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* The two fields. */
.bk__form {
  display: grid;
  align-content: start;
  gap: 18px;
  max-width: 460px;
}

.bk__chosen {
  margin: 0 0 6px;
  padding-right: 44px;
  font-size: 26px;
  line-height: 1.2;
}

.bk__form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

.bk__form input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 160ms var(--ease);
}

.bk__form input:focus {
  border-color: var(--ink);
}

.bk__error {
  margin: 0;
  color: #9a4b42;
  font-size: 14px;
}

.bk__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.bk__back {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.bk__back:hover {
  color: var(--ink);
}

.bk__confirm {
  height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 180ms var(--ease);
}

.bk__confirm:hover {
  background: var(--blue);
}

.bk__confirm:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Booked. */
.bk__done {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  min-height: 460px;
  max-width: 480px;
}

.bk__tick {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk__done h3 {
  margin: 0;
  font-size: 36px;
  font-weight: 300;
}

.bk__done p {
  margin: 0 0 10px;
  color: #2a3443;
  font-size: 17px;
  line-height: 1.5;
}

/* Waiting on times: the mark works. */
.bk__wait {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.bk__wait .mark {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

@media (max-width: 760px) {
  .bk {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .bk__panel {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
  }

  .bk__main {
    overflow: visible;
  }

  .bk__about {
    gap: 10px;
    padding: 22px 20px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .bk__about h2 {
    margin: 0;
    padding-right: 40px;
    font-size: 24px;
  }

  .bk__when {
    display: none;
  }

  .bk__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13.5px;
  }

  .bk__step {
    padding: 22px 20px 24px;
  }

  .bk__pick {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bk__cal header {
    padding-right: 0;
  }

  .bk__slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }

  .bk__done {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bk[open] {
    animation: none;
  }
}
