/* Shared public and client portal booking components. */
/* ────────── Book your next session ──────────
   Tabs of services, the client's likeliest one open; package cards in the
   add-on tile's manner; then one request area that is a calendar for a
   package that books online and an inquiry otherwise. */
.book-next {
    margin: 2rem 0 8rem;
    padding: 3.2rem 3.2rem 3.6rem;
    border: 1px solid rgba(17, 24, 27, 0.12);
    border-radius: 0.4rem;
    background: var(--surface-secondary);
    scroll-margin-top: 11rem;
}
.book-next-head { margin-bottom: 2.4rem; }
.book-next-title {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 3.4vw, 3.4rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
    margin: 0 0 1rem;
}
.book-next-lead {
    font-size: 1.4rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    max-width: 60rem;
}
.book-next-tabs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(17, 24, 27, 0.12);
    scrollbar-width: thin;
}
.book-next-tab {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.1rem 1.6rem 1.3rem;
    border: none;
    background: none;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}
.book-next-tab::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: -1px;
    height: 2px;
    background: transparent;
}
.book-next-tab:hover { color: var(--text-primary); }
.book-next-tab.is-active { color: var(--text-primary); }
.book-next-tab.is-active::after { background: var(--text-primary); }
.book-next-tab:focus-visible { outline: 2px solid var(--surface-accent); outline-offset: -2px; }
.book-next-tab-pick {
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    background: #2f6b4f;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.book-packages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
@media (max-width: 900px) { .book-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .book-packages { grid-template-columns: minmax(0, 1fr); } }
.book-package { position: relative; display: flex; cursor: pointer; margin: 0; }
/* Visually hidden but still focusable; sized explicitly because a site-wide
   rule makes inputs full width, which pushed the page sideways. */
.book-package-input,
.book-addon-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.book-package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid rgba(17, 24, 27, 0.12);
    border-radius: 0.4rem;
    background: var(--surface-primary);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.book-package:hover .book-package-card {
    transform: translateY(-0.2rem);
    border-color: rgba(17, 24, 27, 0.28);
    box-shadow: 0 1rem 2rem rgba(17, 24, 27, 0.08);
}
.book-package-input:checked + .book-package-card {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary), 0 1rem 2rem rgba(17, 24, 27, 0.1);
}
.book-package-input:focus-visible + .book-package-card { outline: 2px solid var(--surface-accent); outline-offset: 2px; }
.book-package-media { display: block; aspect-ratio: 16 / 9; background: var(--surface-secondary); overflow: hidden; }
.book-package-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-package-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
    padding: 1.5rem 1.7rem 1.5rem;
}
.book-package-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1.3;
    color: var(--text-primary);
    padding-right: 2.6rem;
}
.book-package-meta {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.book-package-blurb {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.book-package-mode {
    margin-top: auto;
    padding-top: 0.8rem;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.book-package-check {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 1px solid rgba(17, 24, 27, 0.2);
    background: var(--surface-primary);
    color: transparent;
    font-size: 1.2rem;
    z-index: 1;
}
.book-package-input:checked + .book-package-card .book-package-check {
    border-color: var(--text-primary);
    background: var(--text-primary);
    color: var(--surface-primary);
}

.book-request {
    margin-top: 2.4rem;
    padding: 2.4rem 2.6rem 2.6rem;
    border-radius: 0.4rem;
    background: var(--surface-primary);
    border: 1px solid rgba(17, 24, 27, 0.08);
}
.book-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}
.book-optional {
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    opacity: 0.75;
}
/* Add-ons for the picked package: compact rows, each ticked like a package
   card. Countable ones (per roll, per pack) open a count once ticked; the
   stepper borrows the invoice add-on panel's look. */
.book-addons {
    margin-bottom: 2.4rem;
    padding-bottom: 2.2rem;
    border-bottom: 1px solid rgba(17, 24, 27, 0.08);
}
.book-addons-lead { margin: -0.2rem 0 1.2rem; font-size: 1.25rem; color: var(--text-secondary); }
.book-addon-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}
.book-addon { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.book-addon-pick { position: relative; display: flex; margin: 0; cursor: pointer; }
.book-addon-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    padding: 0.9rem 1.2rem 0.9rem 0.9rem;
    border: 1px solid rgba(17, 24, 27, 0.12);
    border-radius: 0.4rem;
    background: var(--surface-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.book-addon-pick:hover .book-addon-card { border-color: rgba(17, 24, 27, 0.32); }
.book-addon-input:checked + .book-addon-card {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}
.book-addon-input:focus-visible + .book-addon-card { outline: 2px solid var(--surface-accent); outline-offset: 2px; }
.book-addon-thumb {
    flex: none;
    width: 5.6rem;
    height: 5.6rem;
    border-radius: 0.3rem;
    background: var(--surface-secondary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.6rem;
}
.book-addon-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-addon-text { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.book-addon-name { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.3; color: var(--text-primary); }
.book-addon-price { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.book-addon-blurb {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.book-addon-card .book-package-check { position: static; flex: none; }
.book-addon-input:checked + .book-addon-card .book-package-check {
    border-color: var(--text-primary);
    background: var(--text-primary);
    color: var(--surface-primary);
}
.book-addon .addon-quantity { margin: 0 0 0 0.4rem; }

/* The calendar: one month at a time across the package's whole booking
   window. Open days are filled in; a fully booked day is struck through, so
   it reads as an option that has gone rather than one never offered. */
.book-when { margin-bottom: 2.2rem; }
.book-cal { max-width: 46rem; margin-bottom: 1.8rem; }
.book-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.book-cal-month { font-family: var(--font-serif); font-size: 1.9rem; color: var(--text-primary); }
.book-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border: 1px solid rgba(17, 24, 27, 0.15);
    border-radius: 0.4rem;
    background: var(--surface-primary);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
}
.book-cal-nav:hover:not(:disabled) { background: var(--text-primary); border-color: var(--text-primary); color: var(--surface-primary); }
.book-cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.book-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
.book-cal-weekday {
    padding: 0.4rem 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.book-cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.book-cal-day:disabled { cursor: default; opacity: 0.4; }
.book-cal-day.is-open {
    background: var(--surface-secondary);
    border-color: rgba(17, 24, 27, 0.12);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
}
.book-cal-day.is-open:hover { border-color: var(--text-primary); }
.book-cal-day.is-full { opacity: 0.6; text-decoration: line-through; }
.book-cal-day.is-today { box-shadow: inset 0 0 0 1px rgba(17, 24, 27, 0.35); }
.book-cal-day.is-selected { background: var(--text-primary); border-color: var(--text-primary); color: var(--surface-primary); }
.book-cal-body { position: relative; }
.book-cal-day.is-placeholder {
    background: rgba(17, 24, 27, 0.04);
    color: rgba(17, 24, 27, 0.22);
    animation: bookPulse 1.6s ease-in-out infinite;
}
.book-cal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(251, 249, 246, 0.7);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}
.book-spinner {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(17, 24, 27, 0.14);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: bookSpin 0.8s linear infinite;
}
.book-spinner--small {
    width: 1.6rem;
    height: 1.6rem;
    border-width: 0.2rem;
    margin-right: 0.8rem;
    vertical-align: -0.3rem;
}
@keyframes bookSpin { to { transform: rotate(360deg); } }
@keyframes bookPulse { 50% { opacity: 0.5; } }
.book-cal-key { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; margin: 1.2rem 0 0; font-size: 1.15rem; color: var(--text-secondary); }
.book-cal-key span { display: inline-flex; align-items: center; gap: 0.6rem; }
.book-cal-swatch { display: inline-block; width: 1.4rem; height: 1.4rem; border-radius: 0.2rem; }
.book-cal-swatch.is-open { background: var(--surface-secondary); border: 1px solid rgba(17, 24, 27, 0.25); }
.book-cal-swatch.is-full {
    border: 1px solid rgba(17, 24, 27, 0.2);
    background: linear-gradient(to top right, transparent 44%, rgba(17, 24, 27, 0.45) 44% 56%, transparent 56%);
}
.book-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.6rem, 1fr));
    gap: 0.8rem;
}
.book-time {
    padding: 1rem 0.6rem;
    border: 1px solid rgba(17, 24, 27, 0.14);
    border-radius: 0.4rem;
    background: var(--surface-primary);
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}
.book-time:hover:not(:disabled) { border-color: var(--text-primary); }
.book-time:disabled { opacity: 0.4; cursor: not-allowed; }
/* A taken time says so; a free one that is too short for the session is only
   greyed out, with the reason in its tooltip. */
.book-time.is-booked .book-time-at { text-decoration: line-through; }
.book-time small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.book-time.is-selected { background: var(--text-primary); border-color: var(--text-primary); color: var(--surface-primary); }
.book-loading, .book-empty {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin: 0;
}

.book-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 1.6rem;
}
.book-field { display: flex; flex-direction: column; margin: 0; }
/* The script shows and hides parts of the form with the hidden attribute;
   any `display` rule in here would otherwise quietly beat it. */
.book-next [hidden] { display: none !important; }
.book-field--wide { grid-column: 1 / -1; }
.book-input {
    width: 100%;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(17, 24, 27, 0.18);
    border-radius: 0.3rem;
    background: var(--surface-primary);
    font-family: var(--font-sans);
    font-size: 1.4rem;
    color: var(--text-primary);
}
.book-input:focus { outline: none; border-color: var(--text-primary); box-shadow: 0 0 0 1px var(--text-primary); }
textarea.book-input { resize: vertical; min-height: 8rem; }
.book-fixed-location {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 1.35rem;
    color: var(--text-primary);
}
.book-fixed-location i { color: var(--text-secondary); margin-right: 0.4rem; }

.book-who {
    margin-top: 2.2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(17, 24, 27, 0.08);
}
.book-who-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.4rem;
    margin: 0 0 0.6rem;
    font-size: 1.4rem;
    color: var(--text-primary);
}
.book-who-line i { color: var(--text-secondary); font-size: 1.6rem; }
.book-who-line span { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.book-who-change {
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    cursor: pointer;
}
.book-who-change:hover { color: var(--text-primary); }
.book-who-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 1.6rem;
}
.book-who-fields .book-who-change { justify-self: start; grid-column: 1 / -1; }
.book-who-note {
    margin: 1.2rem 0 0;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.book-who-note i { margin-right: 0.4rem; }
.book-error {
    margin: 1.8rem 0 0;
    padding: 1.2rem 1.4rem;
    border-radius: 0.3rem;
    background: rgba(177, 75, 60, 0.08);
    color: #8f3a2e;
    font-size: 1.3rem;
}
.book-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem 2rem;
    margin-top: 2.2rem;
}
.book-submit {
    padding: 1.4rem 2.8rem;
    border: none;
    border-radius: 0.3rem;
    background: var(--surface-accent);
    color: var(--surface-primary);
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}
.book-submit:hover:not(:disabled) { opacity: 0.88; }
.book-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.book-fine { margin: 0; font-size: 1.2rem; color: var(--text-secondary); }
@media (max-width: 620px) {
    .book-next { padding: 2.2rem 1.6rem 2.4rem; }
    .book-request { padding: 1.8rem 1.6rem 2rem; }
    .book-fields, .book-who-fields, .book-addon-list { grid-template-columns: minmax(0, 1fr); }
    .book-submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .book-spinner { animation-duration: 2.4s; }
    .book-cal-day.is-placeholder { animation: none; }
    .book-package-card { transition: none; }
    .book-package:hover .book-package-card { transform: none; }
}
