/*
  studio.Booking in the design of the start page ("B2 Bordeaux",
  Website/wwwroot/css/site.css; decision by Daniel, 23.09.2026). Colours and
  fonts of the MudBlazor components come from Layout/StudioTheme.cs; this file
  styles the booking's own elements. The fonts are served by the application
  itself (SPEC-BOOK-005 rule 12); licences: fonts/OFL-*.txt.
*/

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/cormorant-garamond-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Karla";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/karla-latin.woff2") format("woff2");
}

:root {
    --bg: #1a1115;
    --panel: #24181d;
    --panel-2: #302128;
    --ink: #ecdcd4;
    --mute: #b39ea2;
    --head: #dcaea4;
    --accent: #e8577a;
    --btn: #b01f45;
    --line: #3d2a31;
    --dot: #5e4650;
    --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

    color-scheme: dark;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 500;
    line-height: 1.1;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    margin: 0 0 20px;
    font-size: clamp(36px, 6vw, 52px);
}

h2 {
    margin: 0 0 14px;
    font-size: 28px;
    color: var(--head);
}

/*
  Routes.razor moves the focus to the heading after every navigation, for
  screen readers. The heading is not interactive, so it gets no focus ring.
*/
h1:focus {
    outline: none;
}

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.lead {
    margin: 0 0 20px;
    color: var(--mute);
}

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

.studio-appbar {
    border-bottom: 1px solid var(--line);
}

.studio-main {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.studio-content {
    flex: 1;
    padding-block: 32px 56px;
}

.studio-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 20px clamp(16px, 4vw, 40px);
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--mute);
}

/* The copyright stays left; the legal navigation and the one to the
   „Verwaltung“ sit side by side on the right and wrap left-aligned. */
.studio-footer-copyright {
    margin-right: auto;
}

/* On narrow screens the copyright gets a line of its own, so both
   navigations stay together on the next one. */
@media (max-width: 480px) {
    .studio-footer-copyright {
        flex-basis: 100%;
    }
}

.studio-footer nav {
    display: flex;
    gap: 20px;
}

.studio-footer a {
    color: var(--mute);
    text-decoration: none;
}

.studio-footer a:hover {
    color: var(--ink);
}

/* The logo is painted from two alpha masks, as on the start page. */
.brand-logo {
    display: block;
    position: relative;
    height: 44px;
    aspect-ratio: 640 / 464;
}

.brand-logo::before,
.brand-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--head);
    -webkit-mask: url("images/logo-ink.png") center / contain no-repeat;
    mask: url("images/logo-ink.png") center / contain no-repeat;
}

.brand-logo::after {
    background: var(--accent);
    -webkit-mask-image: url("images/logo-accent.png");
    mask-image: url("images/logo-accent.png");
}

/* Buttons as on the start page: pills. */
.mud-button-root.mud-button {
    border-radius: 999px;
}

/* Action icons of the management tables stay on one line. */
.table-actions {
    white-space: nowrap;
}

/* ---------- booking steps ---------- */

.booking-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mute);
}

.booking-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-step-number {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--dot);
    border-radius: 50%;
    font-size: 12px;
    letter-spacing: 0;
}

.booking-step.done .booking-step-number {
    border-color: var(--head);
    color: var(--head);
}

.booking-step.current {
    color: var(--ink);
}

.booking-step.current .booking-step-number {
    background: var(--btn);
    border-color: var(--btn);
    color: #fff;
}

/* SPEC-BOOK-001 rule 2d: every step already done leads back to itself. */
.booking-step-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.booking-step-link:hover .booking-step-number {
    background: var(--head);
    color: var(--bg);
}

.booking-step-link:hover .booking-step-label {
    color: var(--head);
}

/* SPEC-BOOK-001 rule 2d: "Zurück" above the step display. */
.booking-back {
    margin: -8px 0 12px -8px;
}

.booking-context {
    margin: -12px 0 24px;
    color: var(--mute);
}

/* ---------- treatments, in the manner of the price list ---------- */

/* Two columns on wide screens, as the price list on the start page. */
.treatment-groups {
    columns: 2 340px;
    column-gap: clamp(32px, 5vw, 64px);
}

.treatment-group {
    break-inside: avoid;
    margin-bottom: 36px;
}

.treatment-group h2 {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.treatment-list {
    display: flex;
    flex-direction: column;
}

.treatment-row {
    display: block;
    padding: 14px 12px;
    margin-inline: -12px;
    border-bottom: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s;
}

.treatment-row:hover {
    background: var(--panel);
}

.treatment-row-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.treatment-name {
    font-weight: 600;
}

.treatment-dots {
    flex: 1;
    min-width: 20px;
    border-bottom: 1px dotted var(--dot);
    transform: translateY(-4px);
}

.treatment-duration {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

/* SPEC-BOOK-006 rule 5: the price follows the duration. */
.treatment-price {
    font-weight: 600;
    white-space: nowrap;
}

/* As .price-description on the start page. */
.treatment-description {
    display: block;
    margin-top: 4px;
    max-width: 34em;
    font-size: 15px;
    line-height: 1.6;
    color: var(--mute);
}

/* ---------- add-ons (SPEC-BOOK-001 rule 2c) ---------- */

/* One column: the choice is short and read top to bottom. */
.addon-list {
    display: flex;
    flex-direction: column;
    max-width: 640px;
}

.addon-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
}

.addon-row.selected {
    background: var(--panel);
}

.addon-row input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--btn);
    cursor: pointer;
}

.addon-row-body {
    flex: 1;
    min-width: 0;
}

.addon-total {
    margin: 24px 0 16px;
    color: var(--head);
    font-weight: 600;
}

/* SPEC-BOOK-006 rule 5: the total price directly below the total duration. */
.addon-total + .addon-total {
    margin-top: -8px;
}

/* ---------- employees ---------- */

.employee-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.employee-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    text-decoration: none;
    font: 500 24px/1.1 var(--display);
    transition: border-color 0.2s;
}

.employee-card:hover {
    border-color: var(--head);
}

.employee-initial {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--panel-2);
    color: var(--head);
    font-size: 22px;
}

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

.slot-window {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.slot-window-range {
    color: var(--mute);
    font-variant-numeric: tabular-nums;
}

.slot-loading {
    padding: 24px 0;
}

.slot-empty {
    padding: 20px;
    background: var(--panel);
    border-radius: 14px;
    color: var(--mute);
}

.day-strip {
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.day-chip,
.slot-time {
    font: inherit;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--dot);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.day-chip {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: 14px;
}

.day-chip-weekday {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
}

.day-chip-date {
    /* The text face with lining figures: the old-style figures of the
       display face are hard to read in short dates. */
    font: 600 16px/1.3 var(--body);
    font-variant-numeric: tabular-nums;
}

.day-chip:hover,
.slot-time:hover {
    border-color: var(--ink);
}

.day-chip.selected,
.slot-time.selected {
    background: var(--btn);
    border-color: var(--btn);
}

.day-chip.selected .day-chip-weekday {
    color: #fff;
}

.slot-day-heading {
    margin-top: 24px;
    font: 600 18px/1.3 var(--body);
    font-variant-numeric: tabular-nums;
}

.slot-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}

.slot-time {
    padding: 10px 0;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

/* SPEC-BOOK-006 rule 54: the price of the day, quieter than the date. */
.slot-day-price {
    font-weight: 400;
    color: var(--mute);
}

/* ---------- cards ---------- */

.summary-card,
.form-card,
.link-card {
    padding: 20px 22px;
    margin-bottom: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.summary-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.summary-card.success {
    border-color: #3f5a4a;
}

.summary-title {
    font: 600 22px/1.2 var(--display);
    color: var(--head);
}

.form-card-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}

.form-card-hint,
.link-card-hint {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--mute);
}

/*
 * SPEC-BOOK-006 rules 12 and 13: the summary and the notices before the
 * button are set in the size of the form, never smaller.
 */
.contract-summary {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 16px;
}

.contract-summary h2 {
    margin: 0 0 10px;
}

.contract-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
}

.contract-facts dt {
    color: var(--mute);
}

.contract-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* The receipt facts sit directly above the management link card. */
.contract-facts + .link-card {
    margin-top: 20px;
}

.contract-notice {
    margin: 14px 0 0;
    font-size: 16px;
    color: var(--ink);
}

.contract-notice a,
.contract-facts a {
    color: var(--head);
}

/* SPEC-BOOK-006 rule 23: the section "Termin ändern". */
.manage-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.manage-section h2 {
    margin-bottom: 10px;
}

.manage-hint {
    margin: 10px 0 0;
    color: var(--mute);
}

@media (max-width: 480px) {
    .contract-facts {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .contract-facts dd {
        margin-bottom: 8px;
    }
}

.link-card-purpose {
    margin: 0 0 14px;
}

.link-card-mail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--mute);
}

.link-card-url {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-wrap: anywhere;
}

.link-card-url code {
    font-size: 14px;
    color: var(--head);
}

.link-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* ---------- loading indicator ---------- */

/*
  Shown by Components/App.razor until the WebAssembly client has rendered its
  layout. There is no prerendering (docs/adr/ADR-0002), so this is the only
  thing a visitor sees during the first load.
*/
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 100dvh;
    margin: 0;
    color: var(--mute);
}

/*
  The indicator lies outside the interactive root, so the client never removes
  it; hide it as soon as the MudBlazor layout exists.
*/
body:has(.mud-layout) .app-loading {
    display: none;
}

.app-loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: app-loading-spin 1s linear infinite;
}

@keyframes app-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Respects the operating system setting for reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .app-loading-spinner {
        animation: none;
    }

    * {
        transition: none !important;
    }
}

@media (max-width: 599px) {
    .booking-step-label {
        display: none;
    }

    .booking-step.current .booking-step-label {
        display: inline;
    }
}

/* SPEC-BOOK-001 rule 2e and SPEC-BOOK-002 rule 13c: back to the start page of the booking. */
.start-page-link {
    margin: 24px 0 0 -8px;
}
