/* ReneNeme theme switcher — always loaded, even when the light palette is disabled. */
:root {
    --theme-toggle-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    min-height: 2.45rem;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    border: 1px solid transparent;
    border-radius: 0.78rem;
    padding: 0.55rem 0.72rem;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        color 260ms var(--theme-toggle-ease),
        background-color 260ms var(--theme-toggle-ease),
        border-color 260ms var(--theme-toggle-ease),
        box-shadow 320ms var(--theme-toggle-ease),
        transform 320ms var(--theme-toggle-ease);
}

.theme-toggle__icon {
    position: relative;
    display: inline-flex;
    width: 1.08rem;
    height: 1.08rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.08rem;
}

.theme-toggle__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    transition: opacity 240ms ease, transform 360ms var(--theme-toggle-ease);
}

.theme-toggle__sun,
.theme-toggle__moon {
    position: absolute;
}

html[data-theme="light"] .theme-toggle__sun,
html[data-theme="dark"] .theme-toggle__moon {
    opacity: 0;
    transform: rotate(-24deg) scale(0.72);
}

html[data-theme="light"] .theme-toggle__moon,
html[data-theme="dark"] .theme-toggle__sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

html[data-theme="light"] .theme-toggle {
    border-color: rgba(91, 60, 48, 0.24);
    background: rgba(91, 60, 48, 0.075);
    color: #3F2922;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible {
    border-color: rgba(91, 60, 48, 0.5);
    background: rgba(91, 60, 48, 0.14);
    color: #2C241F;
}

/* Navbar geometry belongs to both themes. Keeping it outside palette.css means
   the original dark skin gets the same floating-to-full-width motion. */
.site-header {
    transition:
        padding 620ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        background-color 560ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        border-color 500ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        box-shadow 560ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        backdrop-filter 560ms var(--motion-ease-soft, var(--theme-toggle-ease));
}

.site-header > div,
.site-header.is-scrolled > div {
    width: 100%;
    max-width: 72rem;
    transition:
        max-width 620ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        min-height 520ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        border-radius 620ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        border-color 480ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        background-color 540ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        box-shadow 540ms var(--motion-ease-soft, var(--theme-toggle-ease)),
        backdrop-filter 540ms var(--motion-ease-soft, var(--theme-toggle-ease));
}

@media (min-width: 1024px) {
    .site-header.is-scrolled {
        padding-right: 0;
        padding-left: 0;
    }

    .site-header.is-scrolled > div {
        max-width: 100vw;
    }
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(200, 146, 42, 0.3);
    background: rgba(200, 146, 42, 0.09);
    color: #D4A340;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible {
    border-color: rgba(200, 146, 42, 0.62);
    background: rgba(200, 146, 42, 0.16);
    color: #F7F3EA;
    box-shadow: 0 0 18px rgba(200, 146, 42, 0.2);
}

/* The booking flow owns a large inline stylesheet. These explicit theme-state
   rules keep every foreground surface in sync with the page backdrop. */
html[data-theme="dark"] .booking-shell {
    background: transparent !important;
    color: #F7F3EA !important;
}

html[data-theme="dark"] .booking-shell::before,
html[data-theme="dark"] .booking-shell::after {
    display: none !important;
}

html[data-theme="dark"] .booking-card {
    border-color: #302D27 !important;
    background: linear-gradient(180deg, rgba(31, 29, 25, 0.96), rgba(14, 13, 11, 0.96)) !important;
    color: #F7F3EA !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38) !important;
}

html[data-theme="dark"] .booking-aside {
    border-color: rgba(200, 146, 42, 0.18) !important;
    background: linear-gradient(145deg, rgba(8, 8, 7, 0.96), rgba(36, 34, 30, 0.94)) !important;
    color: #F7F3EA !important;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .booking-aside .booking-eyebrow,
html[data-theme="dark"] .booking-aside .booking-main-title,
html[data-theme="dark"] .booking-aside strong,
html[data-theme="dark"] .booking-form-title,
html[data-theme="dark"] .booking-title,
html[data-theme="dark"] .booking-field label,
html[data-theme="dark"] .booking-consent label,
html[data-theme="dark"] .booking-choice-card__name,
html[data-theme="dark"] .booking-time-card__time,
html[data-theme="dark"] .booking-date-card__date,
html[data-theme="dark"] .booking-summary-card strong,
html[data-theme="dark"] .selected-service-card strong {
    color: #F7F3EA !important;
}

html[data-theme="dark"] .booking-eyebrow,
html[data-theme="dark"] .booking-choice-card__price,
html[data-theme="dark"] .booking-date-card__day,
html[data-theme="dark"] .booking-change-choice,
html[data-theme="dark"] .selected-service-card #selectedServicePrice {
    color: #D4A340 !important;
}

html[data-theme="dark"] .booking-aside-copy,
html[data-theme="dark"] .booking-copy,
html[data-theme="dark"] .booking-choice-card__copy,
html[data-theme="dark"] .booking-choice-card__meta,
html[data-theme="dark"] .booking-time-card__state,
html[data-theme="dark"] .booking-date-card__hint,
html[data-theme="dark"] .booking-summary-card span,
html[data-theme="dark"] .selected-service-card span,
html[data-theme="dark"] .booking-consent {
    color: #DCD3C2 !important;
}

html[data-theme="dark"] .booking-info-box,
html[data-theme="dark"] .selected-service-card,
html[data-theme="dark"] .booking-summary-card,
html[data-theme="dark"] .booking-empty-state {
    border-color: rgba(200, 146, 42, 0.16) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: #DCD3C2 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .booking-back-link {
    border-color: rgba(200, 146, 42, 0.25) !important;
    background: transparent !important;
    color: #D4A340 !important;
}

html[data-theme="dark"] .booking-control,
html[data-theme="dark"] .booking-input,
html[data-theme="dark"] .booking-textarea,
html[data-theme="dark"] .booking-date-display {
    border-color: #5B554B !important;
    background-color: #171613 !important;
    color: #F7F3EA !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .booking-choice-card,
html[data-theme="dark"] .booking-date-card,
html[data-theme="dark"] .booking-time-card {
    border-color: rgba(200, 146, 42, 0.18) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)) !important;
    color: #F7F3EA !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .booking-choice-card:hover,
html[data-theme="dark"] .booking-date-card:hover,
html[data-theme="dark"] .booking-time-card:hover {
    border-color: rgba(200, 146, 42, 0.48) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)) !important;
}

html[data-theme="dark"] .booking-choice-card.is-selected,
html[data-theme="dark"] .booking-date-card.is-selected,
html[data-theme="dark"] .booking-time-card.is-selected {
    border-color: rgba(200, 146, 42, 0.78) !important;
    background: linear-gradient(180deg, rgba(200, 146, 42, 0.22), rgba(200, 146, 42, 0.08)) !important;
    color: #F7F3EA !important;
    box-shadow: 0 16px 32px rgba(200, 146, 42, 0.14) !important;
}

html[data-theme="dark"] .booking-stepper__item,
html[data-theme="dark"] .booking-stepper__number {
    border-color: rgba(200, 146, 42, 0.16) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #C8C1B4 !important;
}

html[data-theme="dark"] .booking-stepper__item.is-active,
html[data-theme="dark"] .booking-stepper__item.is-complete,
html[data-theme="dark"] .booking-stepper__item.is-active .booking-stepper__number,
html[data-theme="dark"] .booking-stepper__item.is-complete .booking-stepper__number {
    border-color: rgba(200, 146, 42, 0.72) !important;
    background: rgba(200, 146, 42, 0.13) !important;
    color: #F7F3EA !important;
}

html[data-theme="dark"] .booking-button--ghost {
    border-color: #C8922A !important;
    background: transparent !important;
    color: #C8922A !important;
}

html[data-theme="dark"] .booking-loading-overlay {
    background: rgba(0, 0, 0, 0.76) !important;
}

html[data-theme="dark"] .booking-loading-card {
    border-color: #24221E !important;
    background: #171613 !important;
    color: #F7F3EA !important;
}

html[data-theme="dark"] .booking-loading-track {
    background: #24221E !important;
}

html[data-theme="dark"] .reservation-result {
    background:
        radial-gradient(circle at top left, rgba(200, 146, 42, 0.12), transparent 34rem),
        linear-gradient(180deg, #141310 0%, #0D0D0B 46%, #080807 100%) !important;
    color: #F7F3EA !important;
}

html[data-theme="dark"] .reservation-result__card {
    border-color: #302D27 !important;
    background: #171613 !important;
    color: #F7F3EA !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42) !important;
}

html[data-theme="dark"] .reservation-result__brand,
html[data-theme="dark"] .reservation-result__call,
html[data-theme="dark"] .reservation-result__title,
html[data-theme="dark"] .reservation-result__notice-text,
html[data-theme="dark"] .reservation-result__box-value {
    color: #F7F3EA !important;
}

html[data-theme="dark"] .reservation-result__hero {
    background: linear-gradient(145deg, #080807, #24221E) !important;
    color: #F7F3EA !important;
}

html[data-theme="dark"] .reservation-result__notice,
html[data-theme="dark"] .reservation-result__steps,
html[data-theme="dark"] .reservation-result__box,
html[data-theme="dark"] .reservation-result__note,
html[data-theme="dark"] .reservation-result__error-item {
    border-color: rgba(200, 146, 42, 0.25) !important;
    background: linear-gradient(180deg, rgba(31, 29, 25, 0.96), rgba(18, 17, 15, 0.94)) !important;
    color: #DCD3C2 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 14px 30px rgba(0, 0, 0, 0.18) !important;
}

html[data-theme="dark"] .reservation-result__notice {
    border-color: #C8922A !important;
    background: linear-gradient(145deg, rgba(200, 146, 42, 0.18), rgba(24, 22, 18, 0.88)) !important;
}

html[data-theme="dark"] .reservation-result__steps-grid,
html[data-theme="dark"] .reservation-result__box-muted,
html[data-theme="dark"] .reservation-result__note,
html[data-theme="dark"] .reservation-result__copy {
    color: #DCD3C2 !important;
}

html[data-theme="dark"] .reservation-result__summary {
    border-color: #302D27 !important;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    outline: none;
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.theme-toggle:active {
    transform: scale(0.97);
}

.theme-toggle--desktop {
    margin-inline: 0.16rem 0.28rem;
}

.theme-toggle--mobile {
    width: calc(100% - 1.1rem);
    min-height: 3.15rem;
    justify-content: space-between;
    margin: 0.35rem 0.55rem 0.45rem;
    padding-inline: 0.8rem;
    font-size: 0.88rem;
}

.theme-toggle--mobile .theme-toggle__icon {
    order: 2;
}

.theme-toggle--utility {
    min-height: 2.75rem;
    padding-inline: 0.8rem;
}

.theme-toggle--standalone {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 70;
    min-height: 2.7rem;
    padding-inline: 0.85rem;
    backdrop-filter: blur(18px) saturate(1.08);
}

html[data-theme="light"] .theme-toggle--standalone {
    background: rgba(255, 250, 243, 0.92);
    box-shadow: 0 14px 34px rgba(74, 55, 46, 0.14);
}

html[data-theme="dark"] .theme-toggle--standalone {
    background: rgba(13, 13, 11, 0.86);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 440ms;
    animation-timing-function: var(--theme-toggle-ease);
}

::view-transition-old(root) {
    animation-name: theme-fade-out;
}

::view-transition-new(root) {
    animation-name: theme-fade-in;
}

@keyframes theme-fade-out {
    to {
        opacity: 0;
        transform: scale(0.995);
    }
}

@keyframes theme-fade-in {
    from {
        opacity: 0;
        transform: scale(1.005);
    }
}

@media (max-width: 1120px) and (min-width: 1024px) {
    .theme-toggle--desktop .theme-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .theme-toggle--utility {
        width: 2.8rem;
        padding: 0;
    }

    .theme-toggle--utility .theme-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .theme-toggle--standalone {
        top: 0.75rem;
        right: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle,
    .theme-toggle__icon svg,
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
        transition: none;
    }
}
