/* SIM Sessions Booking - standalone pages (client pages + new-look admin).
   The booking-page rules below are the approved prototype's own stylesheet,
   carried over rule for rule; the Branding settings feed its --bk-*
   variables. Admin-shared pieces follow after. */
:root {
    --steel: #5B8296;
    --steel-dark: #47687A;
    --gold: #D8B468;
    --gold-dark: #B8943F;
    --ink: #272A25;
    --line: #DCDAD2;
    --muted: #6B6F66;
    --danger: #B3402E;
    --danger-bg: #F9E9E5;
    --ok: #3E7C4F;
    --ok-bg: #E6F1E8;
    --panel: #FFFFFF;
    --panel-2: #F4F3EF;
    --shadow: 0 10px 30px rgba(39, 42, 37, .10), 0 2px 6px rgba(39, 42, 37, .06);
    --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: #EDECE7;
    color: var(--ink);
    font-family: "Source Sans 3", system-ui, sans-serif;
    line-height: 1.5;
}
a { color: var(--steel-dark); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* ---------- header ---------- */
.simsb-header {
    background: var(--simsb-header-bg);
    color: #F9F8F6;
    padding: 10px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.simsb-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}
.simsb-wordmark {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .04em;
    color: #fff;
}
.simsb-wordmark-sub {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gold);
    margin-left: 10px;
    vertical-align: 2px;
}
/* Cancellation Policy tab, pinned to the header's upper right and
   sitting on its bottom edge like a file tab. */
.simsb-header-tab {
    margin-left: auto;
    align-self: flex-end;
    margin-bottom: -10px;
    color: #F9F8F6;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(249, 248, 246, .12);
    border: 1px solid rgba(249, 248, 246, .45);
    border-bottom: none;
    border-radius: 9px 9px 0 0;
    padding: 8px 16px 12px;
}
.simsb-header-tab:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}
.simsb-main { max-width: 1180px; margin: 0 auto; padding: 18px 18px 70px; }

/* ---------- cancellation policy page ---------- */
.simsb-policy h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 25px;
    line-height: 1.15;
    margin: 28px 0 8px;
}
/* The policy text runs the card's full inner width: the .bk padding
   (clamp(20px, 4vw, 44px) on both sides) is the left and right margin,
   equal on both sides, so no narrower max-width caps the text. */
.simsb-policy p { margin: 10px 0; }
.simsb-policy .simsb-policy-back { margin: 4px 0 18px; max-width: none; }
.simsb-policy .simsb-policy-back:last-child { margin: 22px 0 4px; }
.simsb-policy ul { margin: 8px 0 8px 22px; padding: 0; }
.simsb-policy li { margin: 7px 0; }

/* ---------- public booking page (from the prototype) ---------- */
.bk {
    background: var(--bk-bg, #F9F8F6);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 44px);
    border: 1px solid var(--line);
}
.bk-head { border-bottom: 1px solid rgba(127, 127, 127, .25); padding-bottom: 18px; margin-bottom: 24px; }
.bk-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    line-height: 1.12;
    margin: 0 0 6px;
    color: var(--bk-title-color, #272A25);
    font-size: calc(var(--bk-title-size, 38) * 1px);
    font-weight: var(--bk-title-weight, 700);
    font-style: var(--bk-title-style, normal);
}
.bk-date {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--bk-date-color, #5B8296);
    font-size: calc(var(--bk-date-size, 21) * 1px);
    font-weight: var(--bk-date-weight, 400);
    font-style: var(--bk-date-style, italic);
}
.bk-loc { margin: 6px 0 0; color: var(--bk-title-color, #272A25); opacity: .72; font-size: 15px; }
.bk-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(22px, 4vw, 48px); align-items: start; }
@media (max-width: 780px) { .bk-grid { grid-template-columns: 1fr; } }
.bk-desc { line-height: 1.7; font-size: 16px; color: var(--bk-title-color, #272A25); }
.bk-desc p { margin: 0 0 14px; }
.bk-desc a { color: var(--bk-date-color, #5B8296); font-weight: 600; }
.bk-side {
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(127, 127, 127, .28);
    border-radius: var(--radius);
    padding: 20px;
}
.bk-side h3 {
    margin: 0 0 4px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 23px;
    font-weight: 700;
    color: var(--bk-title-color, #272A25);
}
.bk-side .side-event-title {
    margin: 0 0 1px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--bk-title-color, #272A25);
}
.bk-side .side-date {
    margin: 0 0 2px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: calc(var(--bk-date-size, 21) * 1px);
    font-weight: var(--bk-date-weight, 400);
    font-style: var(--bk-date-style, italic);
    color: var(--bk-date-color, #5B8296);
}
.bk-side .side-sub { margin: 0 0 14px; font-size: 13.5px; color: var(--bk-title-color, #272A25); opacity: .7; }
.pill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill {
    border: 1.5px solid var(--bk-pill-border, #5B8296);
    background: var(--bk-pill-bg, #FFFFFF);
    color: var(--bk-pill-text, #272A25);
    border-radius: 999px;
    padding: 11px 8px;
    font-weight: 700;
    font-size: 15.5px;
    text-align: center;
    transition: background .15s, color .15s, transform .1s;
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: translateY(0); }
.pill.sel {
    background: var(--bk-pill-sel-bg, #5B8296);
    color: var(--bk-pill-sel-text, #FFFFFF);
    border-color: var(--bk-pill-sel-bg, #5B8296);
}
.bk-continue {
    display: block;
    width: 100%;
    margin-top: 16px;
    border: none;
    border-radius: 999px;
    padding: 14px;
    background: var(--bk-btn-bg, #D8B468);
    color: var(--bk-btn-text, #272A25);
    font-weight: 700;
    font-size: 16.5px;
    text-align: center;
    text-decoration: none;
}
.bk-continue:hover:not(:disabled) { filter: brightness(.96); }
.bk-continue:active:not(:disabled) { filter: brightness(.90); }
.bk-continue:disabled { opacity: .45; cursor: not-allowed; }
.bk .field label { color: var(--bk-title-color, #272A25); }
.bk .field input, .bk .field select, .bk .field textarea {
    background: #fff;
    color: #272A25;
    border-color: rgba(127, 127, 127, .4);
}
.pay-box {
    border: 1px dashed var(--bk-pill-border, #5B8296);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--bk-title-color, #272A25);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.pay-box strong { font-size: 17px; }
.back-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--bk-date-color, #5B8296);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
}
.back-link:hover { text-decoration: underline; }
.confirm-check {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bk-pill-sel-bg, #5B8296);
    color: var(--bk-pill-sel-text, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.confirm-lines { font-size: 15px; margin: 0 0 14px; color: var(--bk-title-color, #272A25); }
.confirm-lines div { margin-bottom: 3px; }
.email-card {
    margin-top: 18px;
    border: 1px solid rgba(127, 127, 127, .35);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    color: #272A25;
    font-size: 14px;
}
.email-card .em-head {
    background: #F1EFE9;
    padding: 9px 13px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #6B6F66;
    border-bottom: 1px solid rgba(127, 127, 127, .25);
}
.email-card .em-body { padding: 13px; }
.email-card .em-body p { margin: 0 0 9px; }
.email-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.email-actions a {
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    border: 1px solid var(--steel);
    background: var(--steel);
    color: #fff;
    transition: filter .15s, transform .1s;
}
.email-actions a:hover { filter: brightness(.93); }
.email-actions a:active { filter: brightness(.86); transform: translateY(1px); }
.email-actions a.ghost { background: #fff; color: var(--danger); border-color: var(--danger); }
.all-full {
    padding: 14px;
    border: 1px dashed rgba(127, 127, 127, .5);
    border-radius: 10px;
    font-size: 14.5px;
    color: var(--bk-title-color, #272A25);
}

/* ---------- fields (prototype base rules) ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 5px; }
.field .hint { font-weight: 400; font-size: 12.5px; color: var(--muted); display: block; margin-top: 3px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field input[type="number"], .field select, .field textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    color: inherit;
}
.field textarea { min-height: 74px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--steel);
    outline-offset: 1px;
    border-color: var(--steel);
}

/* ---------- notices ---------- */
.simsb-notice {
    background: var(--ok-bg);
    border: 1px solid #9dbf94;
    color: #2f5227;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 18px;
}
.simsb-errors {
    background: var(--danger-bg);
    border: 1px solid #d8a09a;
    color: #7c231c;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 16px;
    font-size: 14.5px;
    font-weight: 600;
}
.simsb-errors p { margin: 4px 0; }

/* ---------- buttons (admin + manage) ---------- */
.simsb-btn {
    display: inline-block;
    background: var(--simsb-btn-bg);
    color: var(--simsb-btn-color);
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: filter .15s, transform .1s;
}
.simsb-btn:hover:not(:disabled) { filter: brightness(.94); }
.simsb-btn:active:not(:disabled) { filter: brightness(.87); transform: translateY(1px); }
.simsb-btn:disabled { opacity: .45; cursor: not-allowed; }
.simsb-btn-danger { background: var(--danger); color: #fff; }
.simsb-btn-soft { background: #e8eef2; color: #33566b; }
.simsb-btn-soft:hover:not(:disabled) { background: #d9e2e9; filter: none; }
.simsb-cancel-confirm {
    border: 1px solid #d8a09a;
    background: #fff7f5;
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
}
.simsb-cancel-confirm p { margin: 0 0 12px; }
.simsb-cancel-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.simsb-cancel-actions form { margin: 0; }

/* Radio pills (manage page + branding preview) */
.simsb-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.simsb-pill { cursor: pointer; }
.simsb-pill input { position: absolute; opacity: 0; pointer-events: none; }
.simsb-pill span {
    display: inline-block;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--simsb-pill-border);
    background: var(--simsb-pill-bg);
    color: var(--simsb-pill-color);
    font-weight: 700;
    font-size: 15.5px;
    transition: background .15s, color .15s, transform .1s;
}
.simsb-pill:hover span { transform: translateY(-1px); }
.simsb-pill input:checked + span,
.simsb-pill.selected span {
    background: var(--simsb-pill-sel-bg);
    color: var(--simsb-pill-sel-color);
}
.simsb-pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- shared admin pieces ---------- */
.simsb-card {
    background: var(--simsb-card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 20px;
}
.simsb-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--simsb-title-color);
    font-size: var(--simsb-title-size);
    font-weight: var(--simsb-title-weight);
    font-style: var(--simsb-title-style);
    margin: 0 0 6px;
    line-height: 1.12;
}
.simsb-date {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--simsb-date-color);
    font-size: var(--simsb-date-size);
    font-weight: var(--simsb-date-weight);
    font-style: var(--simsb-date-style);
    margin: 0 0 4px;
}
.simsb-choose {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 23px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #272A25;
}
.simsb-side-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #272A25;
}
.simsb-side-date {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--simsb-date-color);
    font-size: var(--simsb-date-size);
    font-weight: var(--simsb-date-weight);
    font-style: var(--simsb-date-style);
    margin: 0 0 16px;
}

/* ---------- loading overlay ---------- */
.simsb-loading {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 19, .55);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.simsb-loading-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 36px;
    text-align: center;
    max-width: 340px;
}
.simsb-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 4px solid #E9E4D2;
    border-top-color: var(--gold);
    animation: simsb-spin .8s linear infinite;
}
@keyframes simsb-spin { to { transform: rotate(360deg); } }
.simsb-loading-box p { margin: 0; font-weight: 600; font-size: 15.5px; color: #272A25; }

/* Multi-day events (v1.12.0): day picker pills above the time list,
   and one group per day in the "All" view. */
.simsb-day-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.simsb-day-group { margin-bottom: 6px; }
.simsb-day-head { font-size: 17px; font-weight: 600; margin: 18px 0 10px; color: var(--simsb-title-color, #272A25); }
.simsb-day-note { color: #666; margin: 0 0 12px; }
