.page-intro--book {
  padding-bottom: 8px;
}

.book {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px var(--gutter) var(--section);
}

.book [hidden] {
  display: none;
}

.book__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.book__month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.book__month-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.book__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.book__nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book__nav:hover:not([disabled]) {
  border-color: var(--ink);
}

.book__nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.book__weekdays,
.book__days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.book__weekdays span {
  padding: 4px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-faint);
}

.book__day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.book__day:hover:not([disabled]) {
  border-color: var(--ink);
}

.book__day[disabled] {
  background: transparent;
  color: var(--text-faint);
  font-weight: 400;
  cursor: default;
}

.book__day.is-today {
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.book__day[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.book__status {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-soft);
}

.book__status:empty {
  display: none;
}

.book__status a {
  color: var(--ink);
}

.book__slots {
  min-height: 320px;
  padding-left: 32px;
  border-left: 1px solid var(--rule);
}

.book__slots-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.book__zone {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-soft);
}

.book__zone-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.book__times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.book__time {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.book__time small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-soft);
}

.book__time:hover,
.book__time:focus-visible {
  background: var(--ink);
  color: #fff;
}

.book__time:hover small,
.book__time:focus-visible small {
  color: rgba(255, 255, 255, 0.75);
}

.book__empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-soft);
}

.book__form,
.book__done {
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.book__form-title,
.book__done-title {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.book__chosen {
  margin: 0 0 22px;
  color: var(--text-soft);
}

.book__chosen strong {
  color: var(--ink);
}

.book__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.book__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.book__field small {
  font-weight: 400;
  color: var(--text-faint);
}

.book__field--wide {
  grid-column: 1 / -1;
}

.book__field input,
.book__field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

.book__field textarea {
  resize: vertical;
  min-height: 84px;
}

.book__field input:focus-visible,
.book__field textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.book__field.is-invalid input,
.book__field.is-invalid textarea {
  border-color: var(--danger);
}

.book__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.book__error {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #fbeceb;
  color: var(--danger);
  font-size: 15px;
}

.book__error a {
  color: inherit;
}

.book__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.book__done-when {
  margin: 0 0 10px;
  font-size: 18px;
}

.book__done-note {
  margin: 0;
  color: var(--text-soft);
}

.book__noscript {
  margin: 24px 0 0;
  text-align: center;
  color: var(--text-soft);
}

@media (max-width: 699px) {
  .book__panel {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }

  .book__slots {
    min-height: 0;
    padding-left: 0;
    padding-top: 24px;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .book__fields {
    grid-template-columns: 1fr;
  }

  .book__form,
  .book__done {
    padding: 20px;
  }
}
