/* ============================================
   ANM Booking App — Shared Structure
   book.css
   Layout, positioning, display, spacing only.
   No colors, border-radius, shadows, or fonts.
   ============================================ */

/* ============================================
   BASE
   ============================================ */

body { margin: 0; padding: 0; width: 100%; font-family: sans-serif; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
ul { display: block; margin: 0; padding: 0; list-style-type: none; text-align: left; }
p { text-align: center; font-family: arial; font-size: 20px; margin: 0 0 40px 0; }
input { outline: none; }
/* hide only the checkbox toggle inputs used for CSS menu hacks */
.book-menu-check,
.app-nav-check,
.nav-toggle-check { display: none; }
h1 { text-align: center; }
h4 { text-align: center; }
video { display: block; margin: 15px auto 0; }

/* ============================================
   SESSION WARNING
   ============================================ */

#session-warning {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
}

/* ============================================
   CORPUS
   ============================================ */

.corpus {
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1100px;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   LOGIN
   ============================================ */

.login-form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}

.login-form label {
    font-size: var(--font-size-sm);
    font-weight: bold;
    text-align: left;
    margin-bottom: 0;
}

.login-form input,
.login-form button {
    display: block !important;
    padding: 10px 16px;
    border: 2px solid transparent;
    font-size: var(--font-size-base);
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.login-form button {
    margin-top: 10px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.login-error {
    max-width: 400px;
    margin: 0 auto 16px;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    text-align: left;
    border-left: 3px solid transparent;
}

/* ============================================
   MODAL
   ============================================ */

/* a hint under a modal field (the rota forms' price markup, spec-price-overrides step 7) */
.modal-form .markup-note { display: block; font-size: var(--font-size-sm); color: var(--color-text-lt); margin: -4px 0 10px; }

/* the desk is warned before a save (spec-front-page § Closures, the operator's 2026-11-08 ruling): the question
   sits in the open modal above its error line, with Book anyway and Back */
.desk-warn { border: 1px solid var(--color-primary-lt); border-left: 4px solid var(--color-primary); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; background: var(--color-primary-lt); }
.desk-warn-text { margin: 0 0 8px; text-align: left; font-size: var(--font-size-sm); color: var(--color-text); }
.desk-warn-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    padding: 4px 8px;
    font-size: var(--font-size-sm);
    font-weight: bold;
    white-space: nowrap;
    transform: translateY(-50%);
    opacity: 0.9;
}

.modal-btn-inline { display: inline !important; width: auto; font-weight: normal; }

.cancel-scope-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.custom-time-toggle {
    display: flex; align-items: center; gap: 8px;
    font-size: var(--font-size-sm); font-weight: bold;
    cursor: pointer; margin-top: 4px;
}
/* inside a .modal-form the full-width input rule would stretch the box and push its words to the far side */
.custom-time-toggle input[type="checkbox"] { display: inline !important; width: auto !important; flex: none; accent-color: var(--color-primary); }

.recurrence-toggle {
    display: flex; align-items: center; gap: 8px;
    font-size: var(--font-size-sm); font-weight: bold;
    cursor: pointer; margin-top: 8px;
}

#recurs-options { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 0 0; }

.series-scope { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.series-scope-label { font-size: var(--font-size-sm); font-weight: bold; margin-bottom: 2px; }
.series-scope label { display: flex; align-items: center; gap: 6px; font-weight: normal; cursor: pointer; }

.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: flex-end;
}

.modal-overlay.modal--open { display: flex; }

.modal {
    position: relative;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px 20px 40px;
    box-sizing: border-box;
}

.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 30px; height: 30px;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}

.modal-title { margin: 0 0 4px; font-size: var(--font-size-lg); padding-right: 40px; }
.modal-subtitle { margin: 0 0 20px; font-size: var(--font-size-sm); }

.modal-form { display: flex; flex-direction: column; gap: 8px; }
.modal-form label { font-size: var(--font-size-sm); font-weight: bold; margin-top: 4px; }

.modal-form input,
.modal-form select,
.modal-form textarea {
    display: block !important;
    width: 100%;
    padding: 10px 14px;
    font-size: var(--font-size-base);
    border: 2px solid transparent;
    box-sizing: border-box;
    outline: none;
}

.modal-form textarea { resize: vertical; min-height: 80px; font-family: var(--font-main); }

.modal-btn {
    padding: 10px 20px;
    font-size: var(--font-size-base);
    font-weight: bold;
    border: none; cursor: pointer; margin-top: 8px;
}

.modal-error {
    font-size: var(--font-size-sm);
    padding: 8px 12px;
    border-left: 3px solid transparent;
}

@media (min-width: 768px) {
    .modal-overlay { align-items: center; }
    .modal { width: 480px; max-height: 85vh; border-radius: 20px; }
}

/* ============================================
   DETAIL PANEL
   ============================================ */

.detail-panel {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 85vh;
    display: flex; flex-direction: column;
}

.detail-panel--open { transform: translateY(0); }

.detail-panel-inner { position: relative; overflow-y: auto; flex: 1; padding: 24px 20px 32px; }

.detail-close {
    position: absolute; top: 16px; right: 16px;
    width: 30px; height: 30px;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}

.detail-header { margin-bottom: 20px; padding-right: 40px; }
.detail-status { display: inline-block; font-size: var(--font-size-sm); font-weight: bold; padding: 2px 10px; margin-bottom: 8px; }
.detail-name { margin: 0 0 4px; font-size: var(--font-size-lg); }
.detail-time { margin: 0; font-size: var(--font-size-sm); }
.detail-body { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.detail-row { display: flex; align-items: flex-start; gap: 12px; }
.detail-row--full { flex-direction: column; gap: 4px; }
.detail-label { font-size: var(--font-size-sm); font-weight: bold; min-width: 60px; flex-shrink: 0; }
.detail-value { font-size: var(--font-size-sm); flex: 1; }
.detail-notes { margin: 0; font-size: var(--font-size-sm); line-height: 1.5; text-align: left; white-space: pre-wrap; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-btn { padding: 8px 16px; font-size: var(--font-size-sm); font-weight: bold; border: none; cursor: pointer; flex: 1; min-width: 80px; }

@media (min-width: 768px) {
    .detail-panel { top: 0; bottom: 0; left: auto; right: 0; width: 360px; max-height: 100vh; transform: translateX(100%); }
    .detail-panel--open { transform: translateX(0); }
}

/* ============================================
   CLIENT SEARCH
   ============================================ */

.client-search-results { overflow: hidden; margin-top: -4px; }
.client-search-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; cursor: pointer; gap: 12px; }
.client-search-name { font-size: var(--font-size-sm); font-weight: bold; }
.client-search-phone { font-size: var(--font-size-sm); }
.client-search-none { padding: 8px 12px; font-size: var(--font-size-sm); font-style: italic; }

/* ============================================
   CALENDAR — LAYOUT
   ============================================ */

.cal-wrap { display: flex; flex-direction: column; width: 100%; overflow: hidden; }

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.cal-toolbar-left { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cal-toolbar-right { display: flex; align-items: center; gap: 8px; }
.cal-view-toggle { display: flex; gap: 2px; }

.cal-btn { padding: 4px 12px; line-height: 22px; cursor: pointer; border: none; font-size: var(--font-size-sm); white-space: nowrap; }
.cal-toolbar-title { padding: 4px 10px; cursor: pointer; font-size: var(--font-size-base); font-weight: bold; white-space: nowrap; }
.cal-toolbar-title-caret { font-size: 0.7rem; margin-left: 4px; }
.cal-subdivision-select { padding: 4px 8px; font-size: var(--font-size-sm); border: none; cursor: pointer; }

.cal-mini-container { padding: 8px 12px; flex-shrink: 0; max-width: 300px; }
/* the desk's mini picker renders through js/monthGrid.js (month-grid.css) since 2026-09-23 */

.cal-week-view,
.cal-day-view { display: flex; flex-direction: column; width: 100%; overflow-x: auto; }

.cal-header-row { display: flex; flex-shrink: 0; position: sticky; top: 0; z-index: 4; }
.cal-time-gutter { width: 40px; flex-shrink: 0; position: relative; }
.cal-day-header { flex: 1; text-align: center; padding: 6px 2px; font-size: var(--font-size-sm); font-weight: bold; line-height: 1.3; }
.cal-day-header--single { font-size: var(--font-size-lg); padding: 10px; }

.cal-body { display: flex; flex: 1; touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; }
.cal-body.dragging { touch-action: none; }

.cal-columns { display: flex; flex: 1; position: relative; min-width: 0; }
.cal-columns--single .cal-day-col { flex: 1; }
.cal-day-col { flex: 1; position: relative; min-width: 44px; border-left: 1px solid transparent; user-select: none; -webkit-user-select: none; }

.cal-time-label { position: absolute; right: 4px; font-size: 0.65rem; line-height: 1; transform: translateY(-50%); white-space: nowrap; }
.cal-grid-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid transparent; pointer-events: none; }

.cal-window { position: absolute; left: 1px; right: 1px; overflow: hidden; cursor: pointer; box-sizing: border-box; border-left: 3px solid transparent; }
.cal-window-label { display: block; font-size: 0.6rem; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-booking { position: absolute; left: 2px; right: 2px; overflow: hidden; cursor: pointer; box-sizing: border-box; display: flex; flex-direction: column; z-index: 2; }
.cal-booking-session { display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; padding: 2px 4px; flex-shrink: 0; }
.cal-booking-name { display: block; font-size: 0.65rem; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.cal-booking-offering { display: block; font-size: 0.55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; opacity: 0.85; }
.cal-booking-time { display: block; font-size: 0.6rem; white-space: nowrap; overflow: hidden; line-height: 1.3; }
.cal-booking-buffer { display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.cal-booking-buffer-label { font-size: 0.55rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }

.cal--mobile .cal-day-header { font-size: 0.6rem; padding: 4px 1px; line-height: 1.3; }
.cal--mobile .cal-day-col    { min-width: 36px; }
.cal--mobile .cal-time-gutter { width: 28px; }
.cal--mobile .cal-time-label { font-size: 0.55rem; }
.cal--mobile .cal-toolbar    { flex-wrap: nowrap; padding: 6px 8px; gap: 4px; }
.cal--mobile .cal-toolbar-left { flex-wrap: nowrap; gap: 2px; flex: 1; justify-content: space-between; }
.cal--mobile .cal-toolbar-right { flex-shrink: 0; gap: 4px; }
.cal--mobile .cal-btn        { padding: 4px 6px; font-size: 0.7rem; line-height: 26px; }
.cal--mobile .cal-btn--prev,
.cal--mobile .cal-btn--next  { padding: 4px 10px; }
.cal--mobile .cal-toolbar-title { font-size: 0.85rem; padding: 4px 6px; flex: 1; text-align: center; line-height: 26px; }
.cal--mobile .cal-subdivision-select { font-size: 0.7rem; padding: 2px 4px; }
.cal--mobile .cal-view-toggle { gap: 1px; }
.cal--mobile .cal-booking-name,
.cal--mobile .cal-booking-time { font-size: 0.55rem; }

/* ============================================
   ACCOUNT — CARD ON FILE
   ============================================ */

.card-on-file-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: var(--radius-block);
}

.card-on-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: bold;
}

.card-on-file-actions {
    display: flex;
    gap: 8px;
}

.card-action-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: bold;
}

.card-field-label {
    font-size: var(--font-size-sm);
    margin-bottom: 4px;
    display: block;
}

.card-field-group {
    margin-bottom: 12px;
}

.card-expiry-cvv {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* the desk's payment-method list (js/deskPay.js — the calendar's checkout and the units screen's payment) */
.checkout-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.checkout-method-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-block);
    border: 1px solid var(--color-primary-lt);
    transition: background 0.15s;
}
.checkout-method-label:hover {
    background: var(--color-primary-lt);
}
.checkout-method-label input[type="radio"] {
    display: inline;
    width: auto;
    accent-color: var(--color-primary);
}

/* the box NMI's card iframes are written into (js/cardCollect.js, every card form) — styled to match
   .modal-form input. The iframe inside cannot see this stylesheet; its text colours travel through
   Collect.js customCss instead. */
.card-field-box {
    border: 2px solid var(--color-primary-lt);
    border-radius: var(--radius-block);
    background: var(--color-white);
    overflow: hidden;
    transition: border-color 0.2s;
}
.card-field-box:focus-within {
    border-color: var(--color-primary);
}
.card-field-box .CollectJSInlineIframe {
    display: block !important;
    width: 100% !important;
    height: 42px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.card-section-note {
    font-size: 0.72rem;
    text-align: center;
    margin-top: 8px;
}

.card-btn--full {
    width: 100%;
    margin-top: 4px;
}

/* ============================================
   ACCOUNT — LAYOUT HELPERS
   ============================================ */

.account-empty--inline {
    padding: 8px 0 4px;
}

/* the removal prompt (js/removalPrompt.js — a last card's Remove, and the household exits) */
.card-ob-head {
    margin: 8px 0 6px;
    color: var(--color-error);
}

.card-ob-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.card-ob-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--color-primary-lt);
    font-size: var(--font-size-sm);
}

.card-ob-row--total {
    font-weight: bold;
    border-bottom: none;
}

.card-ob-sum {
    margin: 4px 0 8px;
    font-weight: bold;
}

.card-ob-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* a household member's row, and a member's booking row: the tier or the controls beside the name */
.hh-member-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* the reschedule picker, opened under a member's booking row */
.hh-rs-host {
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--color-primary-lt);
}

/* modal-form top spacing variant */
.modal-form--spaced {
    margin-top: 16px;
}

/* smaller top spacing variant */
.modal-form--spaced-sm {
    margin-top: 8px;
}

/* bio avatar in booking detail panel */
.book-bio-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    float: left;
    margin: 0 10px 4px 0;
}

/* ============================================
   THE SALE, RENDERED — js/saleRender.js (spec-line-item-cart Pass 3 · spec-ui-wave T1)
   One shape for payment.html, confirmation.html, the cart view and the desk.
   Structural only here; every colour and size is a theme token.
   ============================================ */
.sale-lines { display: flex; flex-direction: column; gap: 4px; }
.sale-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}
.sale-line--sub { padding-left: 12px; color: var(--color-text-lt); }
.sale-line--muted { color: var(--color-text-lt); }
.sale-line-title { min-width: 0; }
.sale-line-detail { color: var(--color-text-lt); }
.sale-line-amount { white-space: nowrap; }
.sale-totals { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--color-primary-lt); }
.sale-total {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--color-primary);
    margin-top: 4px;
}
.sale-total--due { font-size: var(--font-size-base); }
.sale-total--paid { color: var(--color-success, var(--color-primary)); }
.sale-total--muted { font-weight: normal; color: var(--color-text-lt); }
/* a sale's live payment plan (saleRender.plan; spec-installments § The plan rides the sale payload) */
.sale-plan { margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-block); background: var(--color-primary-lt); font-size: var(--font-size-sm); }
.sale-plan-title { font-weight: bold; }
.sale-plan-detail { color: var(--color-text); }
.sale-plan--error { background: var(--color-error-lt); color: var(--color-error); }
.booking-card-details--spaced { margin-top: 8px; }

/* the card picker (vault hand-off, 2026-09-10; one renderer, js/cardPicker.js, since build 2 2026-09-21):
   the radio list, the default badge and the make-default checkbox — one spelling for every surface */
.card-choice {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-choice-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    cursor: pointer;
}
.card-choice-label input[type="radio"] {
    display: inline !important;
    width: auto !important;
    accent-color: var(--color-primary);
}
.card-default-badge {
    font-size: 0.7rem;
    font-weight: normal;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: var(--color-white);
}
.card-make-default {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    cursor: pointer;
}
.card-make-default input[type="checkbox"] {
    display: inline !important;
    width: auto !important;
    accent-color: var(--color-primary);
}

/* the customer's gift certificates on account.html (build 2, 2026-09-21) — a `.card-on-file-display`
   row like the cards above it: code and status on the left, the server-derived balance on the right */
.gc-code { letter-spacing: 0.04em; }
.gc-status {
    font-size: 0.7rem;
    font-weight: normal;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--color-text-lt);
    color: var(--color-white);
}
.gc-row--unusable .gc-code,
.gc-row--unusable .gc-balance { opacity: 0.6; }
.gc-balance { font-size: var(--font-size-sm); font-weight: bold; white-space: nowrap; }
