/* Public booking pages: small, self-contained, no web fonts. Light/dark from the system, data-theme overrides it. */
:root {
    color-scheme: light;
    --bg: #f3f6fb;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #5f6b7a;
    --border: #ccd5e0;
    --primary: #2c8cfa;
    --primary-hover: #1a74db;
    --primary-text: #ffffff;
    --error-bg: #fdecea;
    --error-text: #a12622;
    --note-bg: #fff6dd;
    --note-text: #6b4e00;
    --focus: rgba(44, 140, 250, 0.35);
    /* Calendar: disabled text and error color as in MudBlazor's default palette. */
    --disabled: rgba(0, 0, 0, 0.38);
    --danger: #f44336;
    --hover: rgba(44, 140, 250, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #12161c;
        --card: #1c222b;
        --text: #e6ebf1;
        --muted: #a0abb8;
        --border: #3a4452;
        --primary: #3b90f0;
        --primary-hover: #64a8f5;
        --error-bg: #3d1f1d;
        --error-text: #ffb4ab;
        --note-bg: #3a3214;
        --note-text: #f4dd9b;
        --focus: rgba(59, 144, 240, 0.45);
        --disabled: rgba(255, 255, 255, 0.2);
        --danger: #f64e62;
        --hover: rgba(59, 144, 240, 0.18);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #12161c;
    --card: #1c222b;
    --text: #e6ebf1;
    --muted: #a0abb8;
    --border: #3a4452;
    --primary: #3b90f0;
    --primary-hover: #64a8f5;
    --error-bg: #3d1f1d;
    --error-text: #ffb4ab;
    --note-bg: #3a3214;
    --note-text: #f4dd9b;
    --focus: rgba(59, 144, 240, 0.45);
    --disabled: rgba(255, 255, 255, 0.2);
    --danger: #f64e62;
    --hover: rgba(59, 144, 240, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Inside the website's iframe the page blends into the website. */
.embedded body {
    background: transparent;
}

a {
    color: var(--primary);
}

[hidden] {
    display: none !important;
}

.js .no-js {
    display: none;
}

/* Standalone page */
.booking-page {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
}

.booking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.booking-header h1 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.2;
}

.booking-header-sub {
    display: block;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
}

.booking-intro {
    margin: 0.75rem 0 1.25rem;
    color: var(--muted);
}

.booking-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.booking-footer {
    margin-top: 1.25rem;
    text-align: center;
}

.theme-toggle {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Iframe form */
.booking-embed {
    max-width: 30rem;
    margin: 1rem;
    padding: 0.25rem;
}

/* Form */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
}

.field-row {
    display: flex;
    gap: 0.9rem;
}

@media (max-width: 30rem) {
    .field-row {
        flex-direction: column;
    }
}

label {
    font-weight: 600;
    font-size: 0.95rem;
}

.optional {
    color: var(--muted);
    font-weight: 400;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.button:focus-visible,
.theme-toggle:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus);
}

select:disabled {
    opacity: 0.6;
}

.hint,
.day-note {
    margin: -0.4rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.day-note {
    margin: 0;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: var(--note-bg);
    color: var(--note-text);
}

/* Day picker (like MudBlazor's date picker): colored numbers, no cell backgrounds. */
.label {
    font-weight: 600;
    font-size: 0.95rem;
}

.calendar {
    width: 100%;
    max-width: 21rem;
    margin: 0 auto;
}

.cal-month {
    margin: 0 0 0.5rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.cal-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
}

.cal-nav {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.cal-nav:hover {
    background: var(--hover);
}

.cal-nav:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus);
}

/* Keeps the arrows in place when one of them is hidden. */
.cal-nav[hidden] {
    display: block !important;
    visibility: hidden;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.15rem;
    text-align: center;
}

.cal-weekday {
    padding: 0.35rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.cal-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    max-width: 2.6rem;
    margin: 0 auto;
    width: 100%;
    border-radius: 50%;
    font-weight: 400;
    color: var(--disabled);
    cursor: default;
}

.cal-day input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: inherit;
}

.cal-day.is-free {
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.cal-day.is-free:hover {
    background: var(--hover);
}

.cal-day.is-full,
.cal-day.is-closed {
    color: var(--danger);
    opacity: 0.6;
}

.cal-day.is-today {
    box-shadow: inset 0 0 0 1px var(--disabled);
}

.cal-day:has(input:checked),
.cal-day.is-free:hover:has(input:checked) {
    background: var(--primary);
    color: var(--primary-text);
    opacity: 1;
}

.cal-day:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--focus);
}

html:not(.js) .js-only {
    display: none !important;
}

.booking-errors {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: var(--error-bg);
    color: var(--error-text);
}

.booking-errors p {
    margin: 0.2rem 0;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    background: var(--primary);
    color: var(--primary-text);
}

.button.primary:hover {
    background: var(--primary-hover);
}

.button.secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.booking-done h2,
.booking-card > h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.booking-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
    margin: 1rem 0;
}

.booking-details dt {
    color: var(--muted);
}

.booking-details dd {
    margin: 0;
}

.booking-deadline {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Honeypot: off screen rather than display:none, which some bots skip. */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
