/* --- Schedara brand overrides for Radzen material-base theme --- */
:root {
    --rz-primary: #00796B;
    --rz-primary-light: #4DB6AC;
    --rz-primary-lighter: #B2DFDB;
    --rz-secondary: #00A4BC;
    --rz-secondary-light: #4DD0E1;
    --rz-info: #1976D2;
    --rz-success: #388E3C;
    --rz-warning: #FFA000;
    --rz-danger: #D32F2F;
    --rz-base-background-color: #FAFAFA;
    --rz-body-background-color: #FAFAFA;
    --rz-border-radius: 8px;
    --rz-button-border-radius: 8px;
    --rz-card-border-radius: 8px;
    --rz-dialog-border-radius: 12px;
    --rz-body-font-family: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* --- Schedara public booking design tokens ("soft premium minimalism") ---
   Scoped to the PUBLIC booking palette; admin/auth stay on the Radzen scale.
   --s-primary aliases --rz-primary so the brand teal has a single source of truth. */
:root {
    --s-primary: var(--rz-primary);
    --s-primary-strong: #00695F;
    --s-primary-soft: color-mix(in srgb, var(--s-primary) 8%, #FFFFFF);
    --s-primary-softer: color-mix(in srgb, var(--s-primary) 4%, #FFFFFF);

    --s-bg: #F6F7F8;
    --s-surface: #FFFFFF;
    --s-surface-muted: #EEF0F2;
    --s-border: #E4E7EA;
    --s-border-strong: #CFD3D8;

    --s-text: #111827;
    --s-text-muted: #4B5563;
    --s-text-subtle: #6B7280;

    --s-danger: #DC2626;
    --s-danger-soft: #FEF2F2;
    --s-warning: #D97706;
    --s-warning-soft: #FFFBEB;
    --s-success: #16A34A;

    --s-radius-sm: 6px;
    --s-radius-md: 10px;
    --s-radius-lg: 16px;

    --s-ring: 0 0 0 2px color-mix(in srgb, var(--s-primary) 24%, transparent);
    --s-shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --s-shadow-raised: 0 4px 8px rgba(16, 24, 40, 0.06), 0 10px 28px rgba(16, 24, 40, 0.09);

    --s-font: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;

    --s-dur-fast: 150ms;
    --s-dur: 200ms;
    --s-dur-slow: 300ms;
    /* Wizard step enter/cross-fade + collapsible-section height. 400 ms = M3 "Standard — begins and
       ends on screen". */
    --s-dur-step: 400ms;
    --s-ease: cubic-bezier(0.2, 0, 0, 1);
    --s-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

h1:focus:not(:focus-visible) {
    outline: none;
}

h1:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Došlo k chybě."
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
}

#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal .components-reconnect-show,
#components-reconnect-modal .components-reconnect-failed,
#components-reconnect-modal .components-reconnect-rejected {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    max-width: 400px;
}

/* --- Admin layout --- */

.rz-header {
    background: var(--rz-primary) !important;
    color: #fff !important;
    height: 56px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    z-index: 100;
}

.admin-brand {
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-brand .brand-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: block;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

.admin-sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
}

.admin-sidebar .rz-panel-menu {
    padding: 0.5rem 0;
}

.admin-sidebar .rz-navigation-item-active > .rz-navigation-item-link {
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
    font-weight: 500;
}

.user-email {
    font-size: 0.875rem;
    opacity: 0.9;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-boundary-content {
    max-width: 800px;
    margin: 2rem auto;
}

.error-boundary-public,
.error-boundary-auth {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    background: #fff3f3;
    border: 1px solid #e0b4b4;
    border-radius: 8px;
    color: #333;
}

.error-boundary-public p,
.error-boundary-auth p {
    margin-bottom: 1rem;
}

.error-boundary-link,
.error-boundary-auth a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--rz-primary, #00796B);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    min-height: 44px;
    line-height: 44px;
}

.admin-placeholder {
    padding: 2rem;
}

.admin-placeholder h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--rz-text-color, #212121);
    margin-bottom: 0.5rem;
}

.admin-placeholder p {
    color: #757575;
}

/* --- Onboarding wizard --- */

.onboarding-container {
    max-width: 640px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.onboarding-header {
    text-align: center;
    margin-bottom: 2rem;
}

.onboarding-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rz-primary);
    margin-bottom: 0.25rem;
}

.onboarding-header p {
    color: #757575;
    font-size: 1rem;
}

.onboarding-step {
    padding: 1rem 0;
}

.onboarding-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.working-hours-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.day-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
}

.day-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.day-times {
    display: flex;
    align-items: center;
}

.onboarding-color-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.onboarding-logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.onboarding-logo-img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    object-fit: contain;
}

.onboarding-logo-upload {
    display: flex;
    align-items: center;
}

.onboarding-booking-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.onboarding-done {
    text-align: center;
}

.onboarding-done-icon {
    margin-bottom: 0.5rem;
}

.onboarding-done h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.onboarding-summary {
    text-align: left;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 500;
    color: #757575;
}

.summary-value {
    font-weight: 500;
}

.auth-link-forgot {
    margin-top: 0.5rem;
}

/* --- Services page --- */

.services-page {
    padding: 1.5rem 2rem;
}

.services-category-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.services-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rz-primary);
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rz-primary-lighter);
}

.services-grid .rz-datatable-thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #757575;
}

.service-inactive {
    text-decoration: line-through;
    opacity: 0.6;
}

/* --- Staff page --- */

.staff-page {
    padding: 1.5rem 2rem;
}

.staff-grid .rz-datatable-thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #757575;
}

.staff-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.staff-inactive {
    text-decoration: line-through;
    opacity: 0.6;
}

.staff-services-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem;
}

.staff-service-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.working-hours-editor {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* --- Calendar page --- */

.calendar-page {
    padding: 1rem 1.5rem;
}

.calendar-appointment-content {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    line-height: 1.3;
    overflow: hidden;
    padding: 1px 2px;
}

.calendar-appointment-service {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-appointment-client {
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rz-scheduler-nav-weekrange {
    position: relative;
    display: flex;
    align-items: center;
}

.calendar-week-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--rz-button-border-radius, 8px);
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: var(--rz-secondary, #00A4BC);
    cursor: pointer;
    pointer-events: none;
    white-space: nowrap;
}

.rz-scheduler-nav-weekrange .rz-datepicker {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.rz-scheduler-nav-weekrange .rz-datepicker-trigger {
    width: 100%;
    height: 100%;
    opacity: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

.rz-scheduler-nav-views .rz-button-text .calendar-week-number {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.rz-week-view .rz-slot-header {
    text-transform: capitalize;
}

.rz-month-view .rz-week {
    position: relative;
}

.schedara-week-number {
    position: absolute;
    top: 0;
    left: 2px;
    z-index: 10;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--rz-text-secondary-color);
    background: var(--rz-base-background-color);
    border-radius: 3px;
    padding: 0 3px;
    pointer-events: none;
    user-select: none;
}

.rz-week-view .rz-slot-header.schedara-today {
    background: var(--rz-scheduler-highlight-background-color, rgba(0, 137, 123, 0.08));
}

/* New Reservation dialog: the dialog body is a flex column. The form fields scroll inside
   the overflow container while the action footer (Zrušit / Vytvořit) stays pinned as a
   distinct panel at the bottom — so scrolling fields never slide behind the buttons. */
.reservation-dialog-body {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    gap: 1rem;
}

.reservation-dialog-scroll {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.reservation-dialog-footer {
    flex: 0 0 auto;
    padding: 0.85rem 24px;
    margin: 0 -24px -24px;
    background: var(--rz-base-100);
    border-top: 1px solid var(--rz-border-color, rgba(0, 0, 0, 0.08));
}

/* In the dark theme, --rz-base-100 resolves to a light grey (text-grade tone) that glows
   against the dark dialog. Radzen uses --rz-base-background-color as the elevated surface
   for panels (dropdown, grid header, scheduler, dialog title ...), so switch the footer to
   it there. Radzen marks the active theme via the .rz-material-dark class on .rz-layout. */
:root:has(.rz-material-dark) .reservation-dialog-footer {
    background: var(--rz-base-background-color);
}

/* Responsive: collapse sidebar on small screens */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 240px;
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        z-index: 200;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    }

    .user-email {
        display: none;
    }

    .services-page,
    .staff-page {
        padding: 1rem;
    }

    .calendar-page {
        padding: 0.5rem;
    }

    .calendar-page .rz-stack {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .working-hours-row {
        flex-wrap: wrap;
    }

    .day-toggle {
        min-width: 120px;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}

/* --- Auth layout responsive --- */

.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 1rem;
}

.auth-layout main {
    background: #fff;
    border-radius: var(--rz-card-border-radius, 8px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}

.auth-layout h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212121;
    margin: 0 0 1.5rem;
    text-align: center;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.auth-brand .brand-mark {
    width: 34px;
    height: 34px;
}

.auth-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #071A38;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #424242;
    margin-bottom: 0.25rem;
}

.form-group input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--rz-button-border-radius, 8px);
    font-size: 0.95rem;
    font-family: inherit;
    color: #212121;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--rz-primary);
}

.auth-layout button[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    border: none;
    border-radius: var(--rz-button-border-radius, 8px);
    background: var(--rz-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.auth-layout button[type="submit"]:hover {
    background: var(--rz-primary-light);
}

.error-summary {
    background: #ffebee;
    border: 1px solid #e53935;
    border-radius: var(--rz-border-radius, 8px);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #c62828;
    font-size: 0.9rem;
}

.error-summary p {
    margin: 0;
}

.auth-link {
    text-align: center;
    font-size: 0.9rem;
    color: #616161;
    margin-top: 0.75rem;
}

.auth-link a {
    color: var(--rz-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* --- Client portal: external (social) login --- */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: #9e9e9e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-social-btn {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--rz-button-border-radius, 8px);
    background: #fff;
    color: #212121;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}

.auth-social-btn:hover {
    border-color: var(--rz-primary);
    background: #fafafa;
}

.portal-social-hint {
    margin-top: 0.75rem;
    text-align: center;
}

/* --- Public booking: Studio hero --- */

.studio-hero {
    position: relative;
    background: var(--s-surface);
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow-soft);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.studio-hero-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--studio-accent-tint, var(--s-primary-soft)), color-mix(in srgb, var(--studio-accent-tint, var(--s-primary-soft)) 40%, transparent) 70%, transparent);
}

.studio-hero-inner {
    display: flex;
    flex-direction: column;
}

.studio-hero-info {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.studio-hero-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.studio-hero-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--s-radius-lg);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--s-border), var(--s-shadow-soft);
}

.studio-hero-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: var(--s-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--s-shadow-soft);
}

.studio-hero-name {
    font-family: var(--s-font);
    font-size: clamp(1.5rem, 2.5vw + 1rem, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--s-text);
    margin: 0;
    line-height: 1.25;
}

.studio-hero-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 520px) {
    .studio-hero-details {
        grid-template-columns: 1fr 1fr;
    }
}

.studio-hero-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--s-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.studio-hero-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--s-text-subtle);
}

.studio-hero-phone {
    color: var(--s-primary);
    text-decoration: none;
    font-weight: 600;
}

.studio-hero-phone:hover {
    text-decoration: underline;
}

.studio-hero-hours {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--s-surface-muted);
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    padding: 0.75rem 1rem;
}

.studio-hero-hours-label {
    font-weight: 600;
    color: var(--s-text-muted);
}

.studio-hero-hours-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.25rem 1.5rem;
    font-size: 0.9rem;
}

.studio-hero-hours-row {
    display: contents;
}

.studio-hero-day {
    color: var(--s-text-muted);
    font-weight: 500;
}

.studio-hero-time {
    color: var(--s-text);
}

.studio-hero-visual {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: var(--s-surface-muted);
}

.studio-hero-photo {
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.studio-hero-photo-placeholder {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    background: linear-gradient(135deg, var(--s-surface-muted), color-mix(in srgb, var(--studio-accent-tint, var(--s-primary-soft)) 45%, var(--s-surface-muted)));
}

.studio-hero-placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--s-text-subtle);
}

@media (min-width: 768px) {
    .studio-hero-inner {
        flex-direction: row;
    }

    .studio-hero-info {
        flex: 1;
        min-width: 0;
        padding: 2rem 2.25rem;
    }

    .studio-hero-visual {
        width: 40%;
        max-width: 400px;
        min-height: 280px;
    }

    .studio-hero-photo {
        min-height: 280px;
        max-height: none;
        height: 100%;
    }

    .studio-hero-photo-placeholder {
        min-height: 280px;
    }
}

/* --- Public layout --- */

.public-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--s-bg);
    position: relative;
}

.public-main {
    flex: 1;
}

.public-lang-bar {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.public-topbar-link {
    font-family: var(--s-font);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--s-primary);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--s-primary) 35%, var(--s-border));
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    box-shadow: var(--s-shadow-soft);
    white-space: nowrap;
}

.public-topbar-link:hover {
    border-color: var(--s-primary);
}

.public-lang-select {
    font-family: var(--s-font);
    font-size: 0.8rem;
    padding: 0.25rem 1.75rem 0.25rem 0.875rem;
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    background: var(--s-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.5rem center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    color: var(--s-text-muted);
    box-shadow: var(--s-shadow-soft);
    outline: none;
}

.public-lang-select:hover {
    border-color: var(--s-border-strong);
}

.public-lang-select:focus-visible {
    border-color: var(--s-primary);
    box-shadow: var(--s-ring);
}

.public-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
    color: var(--s-text-subtle);
    border-top: 1px solid var(--s-border);
    background: var(--s-surface);
}

.public-footer-link {
    color: var(--rz-primary);
    text-decoration: none;
    font-weight: 600;
}

.public-footer-link:hover {
    text-decoration: underline;
}

.public-footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.public-footer-legal {
    color: var(--s-text-subtle);
    text-decoration: none;
    font-size: 0.8rem;
}

.public-footer-legal:hover {
    color: var(--s-primary);
    text-decoration: underline;
}

.public-footer-legal:focus-visible {
    outline: 2px solid var(--s-primary);
    outline-offset: 2px;
}

/* --- Legal pages --- */

.legal-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.legal-page h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212121;
    margin: 0 0 0.25rem;
}

.legal-updated {
    font-size: 0.85rem;
    color: #9e9e9e;
    margin: 0 0 2rem;
}

.legal-section {
    margin-bottom: 1.5rem;
}

.legal-section h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #424242;
    margin: 0 0 0.5rem;
}

.legal-section p {
    font-size: 0.95rem;
    color: #616161;
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

.legal-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.legal-section li {
    font-size: 0.95rem;
    color: #616161;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

/* --- Booking page layout --- */

.booking-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 5rem;
}

/* Desktop two-column: the 320px summary column is reserved by the layout at ≥1120px. The page
   content-box width is 1072px so the section column stays 720px (1072 − 320 column − 32 gap),
   exactly the single-column width; the containing block must be ≥1104px viewport-content, hence
   1120px (1120 − 15px scrollbar = 1105; a worst-case 17px scrollbar gives a 1px narrower column,
   accepted). Keyed to the viewport only, never to wizard state (G1/G2). */
@media (min-width: 1120px) {
    .booking-page {
        max-width: 1072px;
    }
}

.booking-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1rem;
    color: var(--s-text-subtle);
    padding: 1rem;
}

.booking-skeleton {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.booking-skeleton-block {
    height: 14px;
    border-radius: var(--s-radius-sm);
    background: var(--s-surface-muted);
    position: relative;
    overflow: hidden;
}

.booking-skeleton-block::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: translateX(-100%);
}

.booking-skeleton-block--hero {
    height: 220px;
    max-width: 460px;
    margin: 0 auto;
    border-radius: var(--s-radius-lg);
}

.booking-skeleton-block--line {
    max-width: 420px;
    margin: 0 auto;
}

.booking-skeleton-block--short {
    max-width: 280px;
}

@keyframes s-shimmer {
    to { transform: translateX(100%); }
}

.booking-loading-hint {
    font-size: 0.9rem;
    margin: 0;
    color: var(--s-text-subtle);
}

@media (prefers-reduced-motion: no-preference) {
    .booking-skeleton-block::after {
        animation: s-shimmer 1.5s ease-in-out infinite;
    }
}

.booking-not-found {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--s-text-muted);
}

.booking-not-found h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--s-text);
    margin-bottom: 0.5rem;
}

.booking-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.booking-section {
    background: var(--s-surface);
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow-soft);
    overflow: clip;
    opacity: 0.55;
    pointer-events: none;
}

/* All new and touched step motion is gated by prefers-reduced-motion (G1/G3/G6).

   Option C, corrected: enhanced navigation PATCHES the section nodes in place — `#section-time`
   keeps its DOM node across `POKRAČUJ` (verified with a node-identity check) — so `@starting-style`
   never fires for them and a transition only faded the dim 0.55 → 1, which is barely visible. Use a
   keyframe animation instead: it starts when `.booking-section--active` is (re)applied, i.e. on an
   actual step change, fades the new step in from 0, and does NOT re-run on month/day navigation
   (the class does not change there).

   Duration is --s-dur-step (400 ms = M3 "Standard — begins and ends on screen"; NN-g puts substantial
   state changes at 200–300 ms, so this is at the calm end). */
@media (prefers-reduced-motion: no-preference) {
    .booking-section {
        transition: box-shadow var(--s-dur-slow) var(--s-ease);
    }

    .booking-section-body {
        transition: grid-template-rows var(--s-dur-step) var(--s-ease);
    }

    @keyframes booking-section-enter {
        from { opacity: 0; }
    }

    .booking-section--active {
        animation: booking-section-enter var(--s-dur-step) var(--s-ease);
    }
}

.booking-section--visible {
    opacity: 1;
    pointer-events: auto;
}

.booking-section--active {
    border-color: color-mix(in srgb, var(--s-primary) 55%, var(--s-border));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--s-primary) 35%, transparent), var(--s-shadow-raised);
}

.booking-section--active > .booking-section-header {
    background: var(--s-primary-softer);
}

.booking-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--s-border);
}

.booking-section-number {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--s-surface-muted);
    color: var(--s-text-subtle);
    border: 1px solid var(--s-border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background var(--s-dur) var(--s-ease), color var(--s-dur) var(--s-ease), border-color var(--s-dur) var(--s-ease);
}

.booking-section--visible .booking-section-number {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.booking-section--done .booking-section-number {
    background: var(--s-primary-soft);
    border-color: color-mix(in srgb, var(--s-primary) 40%, var(--s-border));
    color: var(--s-primary);
}

.booking-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--s-text);
}

/* Collapsed completed step: summary + [Změnit] replace the editable content (§4.6). */
.booking-section--collapsed .booking-section-header {
    border-bottom: 0;
}

.booking-section-summary {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    /* The step-1 summary already carries a server-side " ..."; CSS ellipsis only appears when the
       text is actually clipped (then the server suffix is clipped away too) — never doubled. It
       covers the untruncated step-3 "name, phone" summary on narrow viewports. */
    text-overflow: ellipsis;
    color: var(--s-text-subtle);
}

.booking-section-change {
    flex: 0 0 auto;
    padding: 0.25rem 0.5rem;
    border: 0;
    border-radius: var(--s-radius-sm);
    background: none;
    color: var(--s-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.booking-section-change:hover {
    text-decoration: underline;
}

/* Only the editor's programmatic focus target carries this attribute; suppress its ring only. */
.booking-section-title[data-focus-step]:focus {
    outline: none;
}

/* Narrow screens: the summary needs the space, so keep the step heading for screen readers only
   and let the [Změnit] button keep its min-content width inside the clipped section. */
@media (max-width: 479px) {
    .booking-section--collapsed .booking-section-title {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .booking-section-summary {
        min-width: 0;
        /* Narrow screens: let the summary wrap so the server-appended " ..." is never
           clipped away by the single-line overflow. */
        white-space: normal;
    }
}

.booking-section-content {
    padding: 1.25rem;
}

/* Persistent collapsible body: grid 0fr ↔ 1fr animates the step height in BOTH directions. The
   collapsed step's fields stay in the DOM (inside an inert, form-less wrapper) so the collapse has
   content to animate; they are clipped by the inner wrapper while the row is 0fr. */
.booking-section-body {
    display: grid;
    grid-template-rows: 0fr;
}

.booking-section-body-inner {
    overflow: hidden;
    min-height: 0;
}

.booking-section--visible:not(.booking-section--collapsed) .booking-section-body {
    grid-template-rows: 1fr;
}

.booking-section-placeholder {
    color: var(--s-text-subtle);
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

.booking-next-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    margin-top: 1.25rem;
    border: none;
    border-radius: 999px;
    background: var(--s-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--s-font);
    cursor: pointer;
    box-shadow: var(--s-shadow-soft);
    transition: background var(--s-dur) var(--s-ease), transform var(--s-dur) var(--s-ease), opacity var(--s-dur) var(--s-ease);
}

.booking-next-btn:hover:not(:disabled) {
    background: var(--s-primary-strong);
}

.booking-next-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.booking-next-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Sticky bottom bar --- */

.booking-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--s-surface);
    border-top: 1px solid var(--s-border);
    box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.08);
    transform: translateY(100%);
}

@media (prefers-reduced-motion: no-preference) {
    .booking-bottom-bar {
        transition: transform var(--s-dur-slow) var(--s-ease);
    }
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .booking-bottom-bar {
        background: color-mix(in srgb, var(--s-surface) 88%, transparent);
        backdrop-filter: blur(14px) saturate(1.4);
        -webkit-backdrop-filter: blur(14px) saturate(1.4);
    }
}

.booking-bottom-bar--visible {
    transform: translateY(0);
}

/* D6: below 1120px the desktop aside is hidden; in the 1025–1119px band (wide enough for a
   compact pinned summary yet too narrow for the 320px column) surface the summary-only bar. */
.booking-bottom-bar--summary-only {
    display: none;
}

@media (min-width: 1025px) and (max-width: 1119.98px) {
    .booking-bottom-bar--summary-only {
        display: block;
    }
}

.booking-bottom-bar-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.booking-bottom-bar-summary {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.booking-bottom-bar-text {
    font-size: 0.85rem;
    color: var(--s-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-bottom-bar-price {
    font-weight: 700;
    color: var(--s-primary);
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.booking-bottom-bar-reserve {
    flex-shrink: 0;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: var(--s-primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--s-font);
    cursor: pointer;
    box-shadow: var(--s-shadow-soft);
    transition: background var(--s-dur) var(--s-ease), opacity var(--s-dur) var(--s-ease), transform var(--s-dur) var(--s-ease);
    white-space: nowrap;
}

.booking-bottom-bar-reserve:hover:not(:disabled) {
    background: var(--s-primary-strong);
}

.booking-bottom-bar-reserve:active:not(:disabled) {
    transform: translateY(1px);
}

.booking-bottom-bar-reserve:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Service categories --- */

.service-category {
    margin-bottom: 1.25rem;
}

.service-category:last-of-type {
    margin-bottom: 0;
}

.service-category-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--s-text-subtle);
    margin: 0 0 0.75rem;
}

.service-cards {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* --- Service card --- */

.service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem;
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    transition: border-color var(--s-dur) var(--s-ease), box-shadow var(--s-dur) var(--s-ease), transform var(--s-dur) var(--s-ease);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--s-shadow-raised);
    border-color: var(--s-border-strong);
}

.service-card--selected {
    border-color: var(--s-primary);
    box-shadow: 0 0 0 1px var(--s-primary), var(--s-shadow-soft);
    background: var(--s-primary-softer);
}

.service-card--selected:hover {
    box-shadow: 0 0 0 1px var(--s-primary), var(--s-shadow-raised);
}

.service-card-info {
    flex: 1;
    min-width: 0;
}

.service-card-name {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--s-text);
}

.service-card-description {
    font-size: 0.85rem;
    color: var(--s-text-muted);
    margin: 0.25rem 0 0;
    line-height: 1.45;
}

.service-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--s-text-muted);
}

.service-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--s-surface-muted);
    border: 1px solid var(--s-border);
    font-weight: 500;
    white-space: nowrap;
}

.service-card-duration::before {
    content: "⏱ ";
}

.service-card-price {
    font-weight: 600;
    color: var(--s-text);
}

.service-card-toggle {
    flex-shrink: 0;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: var(--s-primary-soft);
    border: 1px solid color-mix(in srgb, var(--s-primary) 35%, var(--s-border));
    color: var(--s-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--s-font);
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    transition: background-color var(--s-dur) var(--s-ease), color var(--s-dur) var(--s-ease), border-color var(--s-dur) var(--s-ease), box-shadow var(--s-dur) var(--s-ease);
    white-space: nowrap;
}

.service-card-toggle:hover {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.service-card-toggle--selected {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.service-card-toggle--selected:hover {
    background: var(--s-primary-strong);
    border-color: var(--s-primary-strong);
    color: #fff;
}

/* --- Staff picker --- */

.staff-picker {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--s-border);
}

.staff-picker-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
    color: var(--s-text);
}

.staff-picker-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.staff-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    transition: border-color var(--s-dur) var(--s-ease), box-shadow var(--s-dur) var(--s-ease);
}

.staff-card:hover {
    border-color: var(--s-border-strong);
    box-shadow: var(--s-shadow-soft);
}

.staff-card--selected {
    border-color: var(--s-primary);
    box-shadow: 0 0 0 1px var(--s-primary), var(--s-shadow-soft);
    background: var(--s-primary-softer);
}

.staff-card-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--s-surface-muted);
    border: 1px solid var(--s-border);
    color: var(--s-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.staff-card--selected .staff-card-avatar {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
    box-shadow: 0 0 0 2px var(--s-primary-soft);
}

.staff-card-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--s-text);
}

.staff-card-toggle {
    flex-shrink: 0;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    background: var(--s-primary-soft);
    border: 1px solid color-mix(in srgb, var(--s-primary) 35%, var(--s-border));
    color: var(--s-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--s-font);
    cursor: pointer;
    transition: background-color var(--s-dur) var(--s-ease), color var(--s-dur) var(--s-ease), border-color var(--s-dur) var(--s-ease);
    white-space: nowrap;
    margin-left: auto;
}

.staff-card-toggle:hover {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.staff-card-toggle--selected {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.staff-card-toggle--selected:hover {
    background: var(--s-primary-strong);
    border-color: var(--s-primary-strong);
    color: #fff;
}

/* --- Booking collision alert --- */

.booking-collision-alert {
    background: var(--s-warning-soft);
    border: 1px solid color-mix(in srgb, var(--s-warning) 35%, var(--s-border));
    border-radius: var(--s-radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: color-mix(in srgb, var(--s-warning) 85%, #000);
    font-size: 0.9rem;
}

.booking-collision-alert p {
    margin: 0;
}

/* --- Booking confirmation --- */

.confirmation-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.confirmation-success {
    text-align: center;
    margin-bottom: 1.5rem;
}

.confirmation-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.confirmation-icon--success {
    background: var(--s-success);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--s-success) 14%, transparent);
    font-size: 0;
}

.confirmation-check {
    width: 30px;
    height: 30px;
}

.confirmation-check-path {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 32;
    stroke-dashoffset: 0;
}

@keyframes s-check-draw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .confirmation-icon--success .confirmation-check-path {
        stroke-dashoffset: 32;
        animation: s-check-draw 0.55s var(--s-ease-spring) 0.12s forwards;
    }
}

.confirmation-success h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--s-text);
    margin: 0 0 0.5rem;
}

.confirmation-subtitle {
    font-size: 1rem;
    color: var(--s-text-muted);
    margin: 0;
}

.confirmation-card {
    background: var(--s-surface);
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow-soft);
    padding: 0.25rem 1.25rem;
    margin-bottom: 1rem;
}

.confirmation-detail {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--s-border);
}

.confirmation-detail:last-child {
    border-bottom: none;
}

.confirmation-label {
    font-size: 0.85rem;
    color: var(--s-text-subtle);
    flex-shrink: 0;
}

.confirmation-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--s-text);
    text-align: right;
    overflow-wrap: anywhere;
}

.confirmation-price {
    color: var(--s-primary);
}

.confirmation-cancel-info {
    font-size: 0.85rem;
    color: var(--s-text-subtle);
    text-align: center;
    margin: 0 0 1.5rem;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.confirmation-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-family: var(--s-font);
    box-sizing: border-box;
    min-height: 44px;
    line-height: 1.5;
}

.confirmation-btn--calendar {
    background: var(--s-primary);
    color: #fff;
}

.confirmation-btn--calendar:hover {
    background: var(--s-primary-strong);
}

.confirmation-btn--new {
    background: transparent;
    border: 1px solid var(--s-border-strong);
    color: var(--s-text-muted);
}

.confirmation-btn--new:hover {
    background: var(--s-surface-muted);
    color: var(--s-text);
}

.confirmation-btn--ics {
    background: transparent;
    border: 1px solid var(--s-border-strong);
    color: var(--s-text-muted);
}

.confirmation-btn--ics:hover {
    background: var(--s-surface-muted);
    color: var(--s-text);
}

.confirmation-btn--cancel {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--s-danger) 55%, var(--s-border));
    color: var(--s-danger);
}

.confirmation-btn--cancel:hover {
    background: var(--s-danger);
    border-color: var(--s-danger);
    color: #fff;
}

.confirmation-btn--cta {
    background: var(--s-success);
    color: #fff;
}

.confirmation-btn--cta:hover {
    background: color-mix(in srgb, var(--s-success) 88%, #000);
    color: #fff;
}

.booking-bottom-bar-reserve--loading {
    opacity: 0.7;
    cursor: wait;
}

/* --- Contact form --- */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.contact-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--s-text-muted);
}

.contact-form-input {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--s-border-strong);
    border-radius: var(--s-radius-md);
    font-size: 0.95rem;
    font-family: var(--s-font);
    color: var(--s-text);
    background: var(--s-surface);
    transition: border-color var(--s-dur-fast) var(--s-ease), box-shadow var(--s-dur-fast) var(--s-ease), background-color var(--s-dur-fast) var(--s-ease);
    width: 100%;
    box-sizing: border-box;
}

.contact-form-input::placeholder {
    color: var(--s-text-subtle);
}

.contact-form-input:hover:not(:focus):not(.contact-form-input--error) {
    border-color: var(--s-text-subtle);
}

.contact-form-input:focus,
.contact-form-input:focus-visible {
    outline: none;
    border-color: var(--s-primary);
    box-shadow: var(--s-ring);
}

.contact-form-input--error {
    border-color: var(--s-danger);
    background: var(--s-danger-soft);
}

@keyframes s-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: no-preference) {
    .contact-form-input--error {
        animation: s-shake 0.3s var(--s-ease);
    }
}

.contact-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form-phone {
    display: flex;
    gap: 0.5rem;
}

.contact-form-country {
    flex-shrink: 0;
    width: 120px;
    padding: 0.625rem 0.5rem;
    border: 1px solid var(--s-border-strong);
    border-radius: var(--s-radius-md);
    font-size: 0.9rem;
    font-family: var(--s-font);
    color: var(--s-text);
    background: var(--s-surface);
    cursor: pointer;
    transition: border-color var(--s-dur-fast) var(--s-ease), box-shadow var(--s-dur-fast) var(--s-ease);
}

.contact-form-country:focus,
.contact-form-country:focus-visible {
    outline: none;
    border-color: var(--s-primary);
    box-shadow: var(--s-ring);
}

.contact-form-phone-input {
    flex: 1;
}

.contact-form-consent {
    margin-top: 0.5rem;
}

.contact-form-account {
    margin-top: 0.5rem;
}

.contact-form-account-password {
    margin-top: 0.75rem;
    padding-left: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-form-account-password--hidden {
    display: none;
}

.contact-form-hint {
    font-size: 0.78rem;
    color: var(--s-text-muted);
}

.contact-form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--s-text-muted);
    cursor: pointer;
    line-height: 1.5;
}

.contact-form-checkbox {
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--s-primary);
}

.contact-form-link {
    color: var(--s-primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-form-link:hover {
    text-decoration: underline;
}

.contact-form-error {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--s-danger);
}

@media (max-width: 479px) {
    .contact-form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-country {
        width: 100px;
    }
}

/* --- Time slot picker --- */

.timeslot-day {
    margin-bottom: 1.25rem;
}

.timeslot-day:last-of-type {
    margin-bottom: 0;
}

.timeslot-day-label {
    position: sticky;
    top: 0.75rem;
    z-index: 1;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--s-text);
    margin: 0 0 0.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--s-radius-md);
    border: 1px solid var(--s-border);
    background: var(--s-surface);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .timeslot-day-label {
        background: color-mix(in srgb, var(--s-surface) 92%, transparent);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.timeslot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.time-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 44px;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--s-border-strong);
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    color: var(--s-text);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--s-font);
    cursor: pointer;
    box-shadow: var(--s-shadow-soft);
    transition: border-color var(--s-dur-fast) var(--s-ease), background-color var(--s-dur-fast) var(--s-ease), color var(--s-dur-fast) var(--s-ease), box-shadow var(--s-dur-fast) var(--s-ease), transform var(--s-dur-fast) var(--s-ease);
    line-height: 1;
}

.time-chip:hover {
    border-color: var(--s-primary);
    background: var(--s-primary-soft);
    color: var(--s-primary);
    transform: translateY(-1px);
}

.time-chip--selected {
    border-color: var(--s-primary);
    background: var(--s-primary);
    color: #fff;
    box-shadow: 0 0 0 1px var(--s-primary), var(--s-shadow-soft);
}

.time-chip--selected:hover {
    background: var(--s-primary-strong);
    border-color: var(--s-primary-strong);
    color: #fff;
}

.timeslot-empty {
    color: var(--s-text-subtle);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.timeslot-all-empty {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--s-text-subtle);
}

.timeslot-all-empty p {
    margin: 0 0 0.5rem;
}

.timeslot-show-more {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.625rem 1rem;
    margin-top: 1rem;
    border: 1px solid var(--s-border-strong);
    border-radius: var(--s-radius-md);
    background: transparent;
    color: var(--s-primary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--s-font);
    cursor: pointer;
    transition: background-color var(--s-dur) var(--s-ease), color var(--s-dur) var(--s-ease), border-color var(--s-dur) var(--s-ease);
}

.timeslot-show-more:hover {
    background: var(--s-primary-soft);
    border-color: color-mix(in srgb, var(--s-primary) 40%, var(--s-border));
}

.timeslot-contact-cta {
    text-align: center;
    padding: 0.5rem 0;
}

.timeslot-contact-cta p {
    margin: 0 0 0.5rem;
    color: var(--s-text-muted);
}

.timeslot-phone-link {
    color: var(--s-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.timeslot-phone-link:hover {
    text-decoration: underline;
}

@media (max-width: 479px) {
    .booking-bottom-bar-inner {
        padding: 0.5rem 0.75rem;
    }

    .booking-bottom-bar-text {
        font-size: 0.8rem;
    }

    .booking-bottom-bar-price {
        font-size: 0.85rem;
    }

    .booking-bottom-bar-reserve {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .booking-page {
        padding: 2rem 1rem;
        padding-bottom: 5rem;
    }

    .booking-bottom-bar-inner {
        padding: 1rem;
    }

    .booking-bottom-bar-summary {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .time-chip {
        min-width: 70px;
    }
}

/* ==================== Watermark ==================== */

.studio-hero-watermark {
    text-align: center;
    padding: 0.5rem 1rem;
    background: var(--s-surface-muted);
    border-top: 1px solid var(--s-border);
    font-size: 0.8rem;
    color: var(--s-text-subtle);
}

.studio-hero-watermark a {
    color: var(--s-text-subtle);
    text-decoration: none;
    transition: color 0.2s;
}

.studio-hero-watermark a:hover {
    color: var(--s-text-muted);
    text-decoration: underline;
}

.studio-hero-watermark strong {
    color: var(--s-text-muted);
}

/* ==================== Trial Banner ==================== */

.trial-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0.75rem;
    border-radius: var(--rz-border-radius);
    background: var(--rz-info-lighter);
    color: var(--rz-info-darker);
    font-size: 0.85rem;
    font-weight: 500;
}

.trial-banner--urgent {
    background: var(--rz-warning-lighter);
    color: var(--rz-warning-darker);
}

.trial-banner-icon {
    font-size: 1.1rem;
}

/* ==================== Subscription Page ==================== */

.subscription-usage-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.subscription-usage-label {
    flex: 1;
    min-width: 120px;
}

.subscription-usage-value {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.subscription-usage-row .rz-progressbar {
    width: 100%;
}

.subscription-feature-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==================== Settings Tabs (5-04) ==================== */

.settings-tab-content {
    max-width: 800px;
    padding: 1rem 0;
}

.settings-logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.settings-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--rz-border-radius);
    border: 1px solid var(--rz-base-200);
}

.settings-logo-upload {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ==================== Focus visible & keyboard navigation ==================== */

.service-card-toggle:focus-visible,
.staff-card-toggle:focus-visible,
.time-chip:focus-visible,
.timeslot-show-more:focus-visible,
.booking-next-btn:focus-visible,
.booking-section-change:focus-visible,
.booking-bottom-bar-reserve:focus-visible,
.confirmation-btn:focus-visible,
.public-lang-select:focus-visible,
.contact-form-checkbox:focus-visible {
    outline: 2px solid var(--s-primary);
    outline-offset: 2px;
}

.contact-form-input:focus-visible {
    outline: none;
    border-color: var(--s-primary);
    box-shadow: var(--s-ring);
}

.contact-form-country:focus-visible {
    outline: none;
    border-color: var(--s-primary);
    box-shadow: var(--s-ring);
}

/* ==================== Touch targets — min 44px ==================== */

.service-card-toggle {
    min-height: 44px;
    min-width: 44px;
}

.staff-card-toggle {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.875rem;
}

.time-chip {
    min-height: 44px;
}

.booking-next-btn {
    min-height: 44px;
}

.booking-section-change {
    min-height: 44px;
}

.booking-bottom-bar-reserve {
    min-height: 44px;
}

.timeslot-show-more {
    min-height: 44px;
}

.confirmation-btn {
    min-height: 44px;
}

.contact-form-checkbox {
    width: 20px;
    height: 20px;
}

.contact-form-checkbox-label {
    min-height: 44px;
    padding: 0.25rem 0;
}

/* ==================== DataGrid responsive overflow ==================== */

@media (max-width: 768px) {
    .services-grid,
    .staff-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .services-grid .rz-datatable,
    .staff-grid .rz-datatable {
        min-width: 600px;
    }

    .rz-dialog-wrapper .rz-dialog {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    .onboarding-actions {
        flex-wrap: wrap;
    }
}

/* ==================== Skip to content link ==================== */

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--rz-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ==================== Screen reader only ==================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== Platform admin ==================== */

.platform-tenants-grid .rz-data-row {
    cursor: pointer;
}

.platform-tenants-grid .rz-data-row:hover {
    background-color: color-mix(in srgb, var(--rz-primary) 8%, transparent);
}

.platform-tenants-grid .rz-datatable-selectable .rz-state-highlight,
.platform-tenants-grid .rz-datatable-selectable .rz-state-highlight > td {
    background-color: color-mix(in srgb, var(--rz-primary) 16%, transparent);
}

.platform-tenants-grid th.platform-col-clients,
.platform-tenants-grid td.platform-col-clients {
    text-align: center;
}

.platform-tenants-grid td.platform-col-clients .rz-cell-data {
    justify-content: center;
}


/* ==================== Client portal ==================== */

.portal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
    font-family: var(--s-font);
    color: var(--s-text);
}

.portal-back {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--s-text-muted);
    text-decoration: none;
}

.portal-back:hover {
    color: var(--s-primary);
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-subtitle {
    margin: 0.25rem 0 0;
    color: var(--s-text-muted);
}

.portal-hint {
    color: var(--s-text-muted);
}

.portal-section {
    margin-top: 2rem;
}

.portal-section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--s-text-muted);
    margin-bottom: 0.75rem;
}

.portal-card {
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    box-shadow: var(--s-shadow-soft);
    padding: 1rem 1.125rem;
    margin-bottom: 0.75rem;
}

.portal-card--hero {
    border-color: color-mix(in srgb, var(--s-primary) 45%, var(--s-border));
    box-shadow: var(--s-shadow-raised);
}

.portal-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.portal-card-service {
    font-weight: 600;
}

.portal-card-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--s-primary) 12%, transparent);
    color: var(--s-primary);
    white-space: nowrap;
}

.portal-card-status--cancelled,
.portal-card-status--noshow {
    background: var(--s-danger-soft);
    color: var(--s-danger);
}

.portal-card-status--completed {
    background: color-mix(in srgb, var(--s-border) 60%, transparent);
    color: var(--s-text-muted);
}

.portal-card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem 1rem;
    margin: 0.85rem 0 0;
}

.portal-card-detail dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--s-text-muted);
}

.portal-card-detail dd {
    margin: 0.1rem 0 0;
}

.portal-card-reason {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: var(--s-text-muted);
    font-style: italic;
}

.portal-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.portal-card-deadline {
    margin: 0;
    font-size: 0.8rem;
    color: var(--s-text-muted);
}

.portal-cancel-form {
    margin: 0;
}

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    font-family: var(--s-font);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--s-radius-md);
    border: 1px solid var(--s-border-strong);
    background: var(--s-surface);
    color: var(--s-text);
    text-decoration: none;
    cursor: pointer;
}

.portal-btn:hover {
    border-color: var(--s-primary);
}

.portal-btn--primary {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
}

.portal-btn--ghost {
    color: var(--s-text-muted);
}

.portal-btn--danger {
    border-color: color-mix(in srgb, var(--s-danger) 55%, var(--s-border));
    color: var(--s-danger);
    background: transparent;
}

.portal-btn--danger:hover {
    background: var(--s-danger);
    border-color: var(--s-danger);
    color: #fff;
}

.portal-empty {
    color: var(--s-text-muted);
}

.portal-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--s-primary);
    text-decoration: none;
    font-weight: 500;
}

.portal-link:hover {
    text-decoration: underline;
}

.portal-cta {
    margin-top: 1.75rem;
}

.portal-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.portal-pagination-info {
    font-size: 0.85rem;
    color: var(--s-text-muted);
}

.portal-logout {
    margin: 0;
}

.portal-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--s-text-muted);
    line-height: 1.5;
}

.portal-consent-checkbox {
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--s-primary);
}

@media (max-width: 640px) {
    .portal-page {
        padding: 1.75rem 1rem 3rem;
    }
}

/* ==================== Booking flow — Reservio layout ==================== */

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

/* Two-column from the same 1120px breakpoint as .booking-page so width and grid stay in lockstep
   (G1/G2): the 320px column is reserved exactly when the two-column layout is active. */
@media (min-width: 1120px) {
    .booking-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

.booking-summary-aside {
    position: sticky;
    top: 1.5rem;
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    box-shadow: var(--s-shadow-soft);
    padding: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
    .booking-summary-aside {
        transition: opacity var(--s-dur-step) var(--s-ease), transform var(--s-dur-step) var(--s-ease);
    }

    /* Option C re-attaches the subtree on every wizard POST, so this entrance replays per step;
       accepted per §4.2 (the alternative is a one-shot server marker). */
    @starting-style {
        .booking-summary-aside {
            opacity: 0;
            transform: translateX(8px);
        }
    }
}

.booking-summary-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--s-text-subtle);
    margin: 0 0 0.85rem;
}

.booking-summary-business {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 1rem;
}

.booking-summary-studio {
    font-weight: 600;
}

.booking-summary-address {
    font-size: 0.85rem;
    color: var(--s-text-muted);
}

.booking-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
}

.booking-summary-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.booking-summary-row dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--s-text-subtle);
}

.booking-summary-row dd {
    margin: 0;
}

.booking-summary-service {
    display: block;
}

.booking-summary-muted {
    color: var(--s-text-subtle);
}

.booking-cancellation-deadline {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: var(--s-text-muted);
}

/* The aside is hidden exactly when the two-column grid is off — no dead zone (G2). */
@media (max-width: 1119.98px) {
    .booking-summary-aside {
        display: none;
    }
}

/* --- Month calendar --- */

.timeslot-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.timeslot-day-panel {
    min-width: 0;
}

.timeslot-calendar {
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-md);
    background: var(--s-surface);
    box-shadow: var(--s-shadow-soft);
    padding: 0.75rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calendar-month-label {
    font-weight: 600;
    text-transform: capitalize;
}

.calendar-nav {
    /* WCAG 2.5.5 (AAA) target size. The 7-column day grid keeps a documented width shortfall;
       the conformance floor stays WCAG 2.5.8 (AA, 24×24), already met. */
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--s-border-strong);
    border-radius: var(--s-radius-md);
    background: transparent;
    color: var(--s-text);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.calendar-nav:hover {
    border-color: var(--s-primary);
    color: var(--s-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--s-text-subtle);
    padding: 0.25rem 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--s-radius-sm);
    background: transparent;
    color: var(--s-text);
    font-family: var(--s-font);
    font-size: 0.85rem;
    line-height: 1;
}

.calendar-day--blank {
    visibility: hidden;
}

.calendar-day--disabled {
    color: var(--s-text-subtle);
    opacity: 0.45;
}

.calendar-day--empty {
    color: var(--s-text-subtle);
}

.calendar-day--available {
    cursor: pointer;
    font-weight: 600;
    color: var(--s-primary);
    background: var(--s-primary-soft);
    border-color: color-mix(in srgb, var(--s-primary) 25%, var(--s-border));
}

.calendar-day--available:hover {
    border-color: var(--s-primary);
    transform: translateY(-1px);
}

.calendar-day--selected {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: #fff;
    box-shadow: 0 0 0 1px var(--s-primary);
}

@media (max-width: 768px) {
    .timeslot-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== Public gallery (booking page profile) ===== */
.studio-gallery {
    max-width: var(--s-content-max, 1080px);
    margin: 2rem auto;
    padding: 0 1rem;
}
.studio-gallery-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.studio-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.studio-gallery-item {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--s-surface, #f5f5f5);
}
.studio-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.studio-gallery-caption {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    color: var(--s-text-muted, #666);
}

/* ===== Admin gallery tab ===== */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}
.gallery-admin-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid var(--rz-border-color, #ddd);
    border-radius: 8px;
    padding: 0.35rem;
}
.gallery-admin-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}
.gallery-admin-caption {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}
.gallery-admin-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

/* ===== Public in-page anchor navigation (Reservio-style) ===== */
.studio-nav {
    max-width: var(--s-content-max, 1080px);
    margin: 0.5rem auto 0;
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    border-top: 1px solid var(--s-border, #e0e0e0);
    border-bottom: 1px solid var(--s-border, #e0e0e0);
}
.studio-nav-link {
    color: var(--s-text, #222);
    text-decoration: none;
    font-weight: 500;
}
.studio-nav-link:hover,
.studio-nav-link:focus-visible {
    color: var(--s-primary, #2196f3);
    text-decoration: underline;
}
#services-section,
#staff-section,
#reviews-section,
#about-us-section {
    scroll-margin-top: 1rem;
}

/* ===== Public reviews (booking page profile, phase 5D) ===== */
.studio-reviews {
    max-width: var(--s-content-max, 1080px);
    margin: 2rem auto;
    padding: 0 1rem;
}
.studio-reviews-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Collapsible variant (public booking teaser): <summary> is the toggle; hide the native marker. */
.studio-reviews-details > summary.studio-reviews-head {
    cursor: pointer;
    list-style: none;
}
.studio-reviews-details > summary.studio-reviews-head::-webkit-details-marker {
    display: none;
}
.studio-reviews-chevron {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    color: var(--s-text-muted, #666);
}
@media (prefers-reduced-motion: no-preference) {
    .studio-reviews-chevron {
        transition: transform var(--s-dur) var(--s-ease);
    }
}
.studio-reviews-details[open] .studio-reviews-chevron {
    transform: rotate(180deg);
}
.studio-reviews-title {
    font-size: 1.25rem;
    margin: 0;
}
.studio-reviews-summary {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--s-text, #222);
}
.studio-reviews-stars,
.studio-review-stars {
    color: #f5a623;
    letter-spacing: 0.05em;
}
.studio-reviews-average {
    font-weight: 600;
}
.studio-reviews-count {
    color: var(--s-text-muted, #666);
    font-size: 0.9rem;
}
.studio-reviews-leave {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.studio-reviews-empty {
    color: var(--s-text-muted, #666);
}
.studio-reviews-show-all {
    display: inline-block;
    margin-top: 0.75rem;
    font-weight: 600;
}
.studio-reviews-back {
    max-width: var(--s-content-max, 1080px);
    margin: 0 auto 2rem;
    padding: 0 1rem;
}
.studio-reviews-list {
    display: grid;
    gap: 0.75rem;
}
.studio-review-card {
    border: 1px solid var(--s-border, #e0e0e0);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: var(--s-surface, #fafafa);
    /* A long unbreakable token (URL, GUID-like text) must not widen the grid item past the
       viewport: `overflow-wrap: anywhere` also reduces the intrinsic min-content size. */
    min-width: 0;
    overflow-wrap: anywhere;
}
.studio-review-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.studio-review-author {
    font-weight: 600;
}
.studio-review-date {
    margin-left: auto;
    color: var(--s-text-muted, #666);
    font-size: 0.85rem;
}
.studio-review-comment {
    margin: 0;
    white-space: pre-line;
}
.studio-review-reply {
    margin-top: 0.6rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--s-primary, #2196f3);
}
.studio-review-reply-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--s-text-muted, #666);
}
.studio-review-reply-text {
    margin: 0.15rem 0 0;
    white-space: pre-line;
}

/* Review submission form */
.review-form-hint {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--s-text-muted, #666);
}
.review-rating-field {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
}
.review-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.15rem;
    font-size: 2rem;
    line-height: 1;
}
.review-stars-input input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.review-stars-input label {
    cursor: pointer;
    color: #ccc;
}
.review-stars-input input:checked ~ label,
.review-stars-input label:hover,
.review-stars-input label:hover ~ label {
    color: #f5a623;
}
.review-stars-input input:focus-visible + label {
    outline: 2px solid var(--s-primary, #2196f3);
    outline-offset: 2px;
}
.review-consent-label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.9rem;
}
