/* Telas de reserva. Cores e medidas do pacote de design "Molinari — Reserva online". */
:root {
    --surface-100: #000000;
    --surface-200: #0D0D0D;
    --surface-300: #1C1C1C;
    --panel: #121212;
    --panel-line: rgba(232, 199, 154, .5);
    --row-hover: #161616;
    --ink: #FFFFFF;
    --ink-muted: #B5B5B5;
    --border: #2A2A2A;
    --border-strong: #707070;
    --brand: #FFFFFF;
    --brand-strong: #E8C79A;
    --on-brand: #000000;
    --accent: #E8C79A;
    --on-accent: #000000;
    --focus-ring: #E8C79A;
    --success: #6FD3C0;
    --warning: #F0B34A;
    --danger: #FF7A72;
    --info: #7DB8F0;
    --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
    --font-sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;
}

html, body {
    margin: 0;
    background: var(--surface-100);
    color: var(--ink);
    font-family: var(--font-sans);
}

a { color: var(--accent); }
a:hover { color: var(--ink); }

button, input, textarea, select {
    font: inherit;
    color: inherit;
    margin: 0;
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-muted);
}

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

/* Indicador de carregamento do WebAssembly: anel dourado que se preenche com a porcentagem no centro. Some quando
   a primeira tela é desenhada. */
@property --blazor-load-percentage {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
}

:root {
    /* Com a propriedade registrada acima, o anel avança suave entre um arquivo baixado e outro. */
    transition: --blazor-load-percentage 0.35s ease-out;
}

.boot-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-100);
    /* Com tudo em cache a tela abre antes disso, e o indicador nem chega a aparecer. */
    animation: boot-fade-in 0.3s ease-out 0.4s both;
}

body:has(.booking-page, .panel-page, .auth-page, .not-found) .boot-loading {
    display: none;
}

.boot-ring {
    position: relative;
    width: 136px;
    height: 136px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 18px rgba(232, 199, 154, .25));
}

/* O anel: gradiente cônico (dourado até a porcentagem, trilho no resto) recortado em aro por uma máscara. */
.boot-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--accent) var(--blazor-load-percentage, 0%), var(--border) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}

.boot-percent {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
    color: var(--accent);
}

.boot-percent::after {
    content: var(--blazor-load-percentage-text, "0%");
}

@keyframes boot-fade-in {
    from {
        opacity: 0;
        transform: scale(.96);
    }
}

@media (prefers-reduced-motion: reduce) {
    :root {
        transition: none;
    }

    .boot-loading {
        animation: none;
    }
}

.num {
    font-variant-numeric: tabular-nums lining-nums;
}

/* Casca compartilhada pelos passos do fluxo de reserva. */
.booking-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.booking-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.booking-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 24px;
}

.booking-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 30px;
    line-height: 34px;
}

@media (min-width: 900px) {
    .wrap { padding: 0 32px; }

    .booking-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 64px;
        align-items: start;
        padding-bottom: 64px;
    }

    .booking-content { padding-top: 24px; }

    .booking-title {
        font-size: 44px;
        line-height: 44px;
    }
}

/* Telas de resultado e de "minha reserva": coluna de leitura e botões. */
.page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    padding-bottom: 32px;
}

.page-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 560px;
}

.lead {
    margin: 0;
    font-size: 18px;
    line-height: 28px;
}

.button {
    height: 52px;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-md);
    font-size: 16px;
    line-height: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-primary,
.button-primary:hover {
    background: var(--brand);
    color: var(--on-brand);
}

.button-danger,
.button-danger:hover {
    background: var(--danger);
    color: var(--on-brand);
}

.button-outline,
.button-outline:hover {
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--ink);
}

.button-compact {
    height: 48px;
    padding: 0 16px;
}

.text-link {
    align-self: flex-start;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}

.text-danger {
    color: var(--danger);
}

.page-error {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--danger);
}

.page-status {
    padding-top: 24px;
    padding-bottom: 24px;
}

@media (min-width: 900px) {
    .page-body {
        padding-top: 40px;
        padding-bottom: 64px;
    }
}

/* Painel do gestor: largura maior que a das telas de reserva e campos de formulário compartilhados. */
.panel-wrap {
    max-width: 1440px;
}

.field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.reveal {
    min-height: 44px;
    margin: -10px 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.panel-input {
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-200);
    font-size: 16px;
}

.panel-input.is-invalid {
    border: 2px solid var(--danger);
}
