/* /book: pick a time, then enter details. Layout shell comes from legal.css. */

/* Sections and buttons set display, which would beat the hidden attribute. */
.legal-body [hidden] {
  display: none;
}

.book-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--corner-small);
}

.book-section-head h2,
.book-section-head p,
.book-pick > p,
.book-day h3 {
  margin: 0;
}

.book-pick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.book-filter {
  position: relative;
  flex: none;
}

.book-filter summary {
  list-style: none;
  cursor: pointer;
}

.book-filter summary::-webkit-details-marker {
  display: none;
}

.book-filter-menu {
  position: absolute;
  top: calc(100% + var(--corner-small));
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
  padding: 8px;
  border-radius: var(--corner-medium);
  background: var(--white);
  box-shadow:
    0 0 var(--xsmall) 0 var(--fade-dark-20),
    0 var(--xsmall) var(--corner-small) 0 var(--fade-dark-10);
}

.book-filter-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--corner-small);
  color: var(--text-secondary);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-small-size);
  font-weight: var(--body-small-weight);
  line-height: var(--body-small-line);
  cursor: pointer;
}

.book-filter-menu label:hover {
  background: var(--fade-dark-10);
}

.book-filter-menu label span {
  margin-left: auto;
  color: var(--text-warm);
}

.book-filter-clear {
  margin-top: 4px;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--fade-dark-10);
  background: none;
  color: var(--text-warm);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-small-size);
  font-weight: var(--body-small-weight);
  line-height: var(--body-small-line);
  text-align: left;
  cursor: pointer;
}

.book-filter-clear:hover,
.book-filter-clear:focus-visible {
  text-decoration: underline;
}

.book-filter-menu input {
  accent-color: var(--primary-pink);
}

.book-zone {
  color: var(--text-warm);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-small-size);
  font-weight: var(--body-small-weight);
  line-height: var(--body-small-line);
}

.book-days {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.book-day {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-day h3 {
  color: var(--text-on-base);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-normal-size);
  font-weight: var(--body-normal-bold-weight);
  line-height: var(--body-normal-line);
}

.book-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--corner-small);
}

.book-chosen {
  color: var(--text-on-base);
}

.book-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.book-field {
  display: flex;
  flex-direction: column;
  gap: var(--corner-small);
  width: 100%;
}

.book-label {
  color: var(--text-warm);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-small-size);
  font-weight: var(--body-small-weight);
  line-height: var(--body-small-line);
}

.book-field input,
.book-field textarea {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--corner-medium);
  background: var(--white);
  color: var(--text-secondary);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-small-size);
  font-weight: var(--body-small-weight);
  line-height: var(--body-small-line);
  box-shadow:
    inset 0 0 var(--corner-medium) 0 color-mix(in srgb, var(--primary-pink) 15%, transparent),
    0 0 var(--xsmall) 0 var(--fade-dark-20),
    0 var(--xsmall) var(--corner-small) 0 var(--fade-dark-10);
}

.book-field input {
  height: 48px;
}

.book-field textarea {
  resize: vertical;
}

.book-field input:hover,
.book-field input:focus,
.book-field textarea:hover,
.book-field textarea:focus {
  outline: var(--xsmall) solid var(--primary-pink);
  outline-offset: var(--xsmall);
}

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

.book-error {
  margin: 0;
  color: var(--core-error);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-normal-size);
  font-weight: var(--body-normal-weight);
  line-height: var(--body-normal-line);
}

.book-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .book-field input,
  .book-field textarea {
    font-size: var(--body-normal-size);
  }

  .book-form .btn-primary {
    width: 100%;
  }
}
