/* ═══════════════════════════════════════════════════════════════
   PUBLIC PAGE — chrome around the templates (forms, scheduler, 404)
   Loaded only on /p/* and /psicologo/*, where nothing else is.
   ═══════════════════════════════════════════════════════════════ */

html, body { margin: 0; padding: 0; }

.lp-layout-root { min-height: 100vh; }

/* ── Not found ── */

.lp-notfound {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 70vh;
    padding: 2rem;
    text-align: center;
    font-family: 'Onest', system-ui, sans-serif;
    color: #3d4a4a;
    background: #F9F7F2;
}

.lp-notfound h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; margin: 0; }
.lp-notfound p { color: #6b7878; margin: 0; }
.lp-notfound a { color: #3E6D66; margin-top: 1rem; }

/* ═══════════════════════════════════════════════
   CARD — the frame every form sits in
   The templates are furnished and photographic; a bare stack of inputs
   dropped onto them read as an afterthought. Each form gets a surface
   of its own, inheriting the template's palette through the --lp-* vars.
   ═══════════════════════════════════════════════ */

.lp-card {
    max-width: 44rem;
    padding: 2rem 2rem 2.25rem;
    border-radius: 1.75rem;
    background: var(--lp-surface);
    border: 1px solid color-mix(in srgb, var(--lp-text) 8%, transparent);
    box-shadow: 0 34px 70px -52px color-mix(in srgb, var(--lp-primary) 90%, #000);
}

.lp-card + .lp-card { margin-top: 1.75rem; }

.lp-card-head {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    margin-bottom: 1.75rem;
}

.lp-card-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .9375rem;
    background: color-mix(in srgb, var(--lp-primary) 11%, transparent);
    color: var(--lp-primary);
    font-size: 1.375rem;
}

.lp-card-head .lp2-h2 { margin: 0; }

.lp-card-sub {
    margin: .3125rem 0 0;
    font-size: .9375rem;
    line-height: 1.55;
    color: var(--lp-text-secondary);
}

/* Inside the Agenda template the hero panel is already the frame. */
.lp2-book-panel .lp-card {
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.lp2-book-panel .lp-card-head { margin-bottom: 1.25rem; }
.lp2-book-panel .lp-card-icon { width: 2.25rem; height: 2.25rem; font-size: 1.125rem; border-radius: .75rem; }

/* ── Steps ── */

.lp-step {
    display: flex;
    align-items: baseline;
    gap: .625rem;
    margin: 2rem 0 .875rem;
}

.lp-step:first-child { margin-top: 0; }

.lp-step-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    align-self: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--lp-primary) 12%, transparent);
    color: var(--lp-primary);
    font-size: .75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lp-step-text { font-size: .9375rem; font-weight: 600; color: var(--lp-text); }
.lp-step-note { font-weight: 400; color: var(--lp-text-secondary); }

/* ── Fields ── */

.lp-form { max-width: 100%; }

.lp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 1rem 1.125rem;
}

.lp-field { display: flex; flex-direction: column; gap: .4375rem; min-width: 0; }
.lp-field--full { grid-column: 1 / -1; }

.lp-field-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--lp-text);
}

.lp-req { color: var(--lp-primary); font-style: normal; }

.lp-field-input {
    width: 100%;
    /* An <input> carries an intrinsic width from its `size`; without this it sets the
       minimum width of the grid it sits in, and the page grows past the viewport. */
    min-width: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--lp-text);
    background: color-mix(in srgb, var(--lp-text) 3%, var(--lp-surface));
    border: 1px solid color-mix(in srgb, var(--lp-text) 13%, transparent);
    border-radius: .875rem;
    padding: .8125rem 1rem;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
    resize: vertical;
}

.lp-field-input::placeholder { color: color-mix(in srgb, var(--lp-text-secondary) 70%, transparent); }

.lp-field-input:hover { border-color: color-mix(in srgb, var(--lp-text) 22%, transparent); }

.lp-field-input:focus {
    background: var(--lp-surface);
    border-color: var(--lp-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--lp-primary) 14%, transparent);
}

.lp-field-error {
    font-size: .8125rem;
    color: #c0392b;
}

.lp-form-error-banner {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin: 0 0 1.25rem;
    padding: .8125rem 1rem;
    border-radius: .875rem;
    background: color-mix(in srgb, #c0392b 8%, transparent);
    border: 1px solid color-mix(in srgb, #c0392b 25%, transparent);
    color: #a5321f;
    font-size: .9375rem;
}

.lp-form-error-banner .material-symbols-outlined { font-size: 1.25rem; }

/* Blazor marks invalid fields on the server render too. */
.lp-field-input.invalid { border-color: #c0392b; }

/* ── Submit ── */

.lp-submit {
    width: 100%;
    justify-content: center;
    margin-top: 1.5rem;
    padding: .9375rem 1.5rem;
    font-size: 1rem;
}

.lp-reassure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    margin: .875rem 0 0;
    font-size: .8125rem;
    color: var(--lp-text-secondary);
}

.lp-reassure .material-symbols-outlined { font-size: 1rem; }

/* ── Sent confirmation ── */

.lp-sent {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: color-mix(in srgb, var(--lp-primary) 7%, var(--lp-surface));
    border: 1px solid color-mix(in srgb, var(--lp-primary) 20%, transparent);
}

.lp-sent-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--lp-primary);
    color: #fff;
}

.lp-sent-icon .material-symbols-outlined { font-size: 1.625rem; }
.lp-sent-title { margin: 0; font-weight: 600; font-size: 1.0625rem; }
.lp-sent-text { margin: .25rem 0 0; font-size: .9375rem; color: var(--lp-text-secondary); }

/* ── Day strip ── */

.lp-days-wrap { position: relative; }

.lp-days {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .25rem .25rem .75rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--lp-text) 20%, transparent) transparent;
    /* Thirty days never fit. Fading the trailing edge reads as "there is more"
       instead of as a day cut in half by the card border. */
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
}

.lp-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .0625rem;
    flex: 0 0 auto;
    width: 4.25rem;
    padding: .75rem .25rem .6875rem;
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--lp-text) 11%, transparent);
    background: var(--lp-surface);
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.lp-day:hover {
    border-color: color-mix(in srgb, var(--lp-primary) 45%, transparent);
    background: color-mix(in srgb, var(--lp-primary) 5%, var(--lp-surface));
    transform: translateY(-2px);
}

.lp-day--on {
    background: var(--lp-primary);
    border-color: var(--lp-primary);
    color: #fff;
    box-shadow: 0 12px 24px -14px var(--lp-primary);
}

.lp-day--on:hover { background: var(--lp-primary); transform: none; }

/* Saturday and Sunday: still clickable, just visibly not the working week. */
.lp-day--weekend:not(.lp-day--on) { opacity: .62; }

.lp-day-dow { font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; opacity: .78; }
.lp-day-num { font-size: 1.1875rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lp-day-mon { font-size: .6875rem; opacity: .72; }

.lp-days-hint {
    display: flex;
    align-items: center;
    gap: .3125rem;
    margin: .125rem 0 0;
    font-size: .75rem;
    color: var(--lp-text-secondary);
}

.lp-days-hint .material-symbols-outlined { font-size: .9375rem; }

/* ── Slots ── */

.lp-sched-empty {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9375rem;
    line-height: 1.5;
    color: var(--lp-text-secondary);
    background: color-mix(in srgb, var(--lp-text) 4%, transparent);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
}

.lp-sched-empty .material-symbols-outlined { font-size: 1.375rem; flex-shrink: 0; }

.lp-slot-group + .lp-slot-group { margin-top: 1rem; }

.lp-slot-group-label {
    display: flex;
    align-items: center;
    gap: .375rem;
    margin: 0 0 .5rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lp-text-secondary);
}

.lp-slot-group-label .material-symbols-outlined { font-size: .9375rem; }

.lp-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
    gap: .5rem;
}

.lp-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .625rem .5rem;
    border-radius: .8125rem;
    border: 1px solid color-mix(in srgb, var(--lp-text) 13%, transparent);
    background: var(--lp-surface);
    font-size: .9375rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

/* The whole pill is the control, so the native dot would only be visual noise —
   but it stays in the DOM and focusable, which is what keeps it keyboard-usable. */
.lp-slot input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.lp-slot:hover {
    border-color: color-mix(in srgb, var(--lp-primary) 45%, transparent);
    background: color-mix(in srgb, var(--lp-primary) 5%, var(--lp-surface));
}

.lp-slot:has(input:focus-visible) {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-primary) 30%, transparent);
}

.lp-slot:has(input:checked) {
    border-color: var(--lp-primary);
    background: var(--lp-primary);
    color: #fff;
    font-weight: 600;
}

/* ── Small screens ── */

@media (max-width: 640px) {
    .lp-card { padding: 1.5rem 1.25rem 1.75rem; border-radius: 1.5rem; }
    .lp-form-grid { grid-template-columns: 1fr; }
    .lp-card-icon { width: 2.375rem; height: 2.375rem; font-size: 1.125rem; }
    .lp-sent { padding: 1.25rem; gap: .875rem; }
    .lp-sent-icon { width: 2.5rem; height: 2.5rem; }
}

/* The warm template centres its sections, so the card follows suit.
   Field labels stay left-aligned — centred labels hurt scanning. */
.tpl-warm .lp-card,
.tpl-warm .lp-sent { margin-inline: auto; }
.tpl-warm .lp-card-head { justify-content: center; text-align: left; }
.tpl-minimal .lp-card { box-shadow: none; }

/* ═══════════════════════════════════════════════
   CONSENT — LGPD banner, shown only when the page
   actually loads a tracker. Anchored to the bottom rather than
   thrown over the page: the visitor came to read, not to answer a modal.
   ═══════════════════════════════════════════════ */

.lp-consent {
    font-family: var(--lp-font-body, 'Onest', system-ui, sans-serif);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
}

/* `display: inline-flex` on the reopen pill outranks the UA's `[hidden] { display: none }`,
   which left the "change your mind" button on screen next to the banner it replaces. */
.lp-consent [hidden] { display: none !important; }

/* Once answered, only the small "change your mind" pill remains. */
.lp-consent--idle { padding: .75rem 1rem; }

.lp-consent-card {
    pointer-events: auto;
    width: min(40rem, 100%);
    box-sizing: border-box;
    padding: 1.25rem 1.375rem 1.125rem;
    border-radius: 1.375rem;
    background: var(--lp-surface);
    border: 1px solid color-mix(in srgb, var(--lp-text) 10%, transparent);
    box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--lp-text) 40%, transparent),
                0 2px 8px -2px color-mix(in srgb, var(--lp-text) 12%, transparent);
    animation: lp-consent-in .45s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes lp-consent-in {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-consent-card { animation: none; }
}

.lp-consent-head {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
}

.lp-consent-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .875rem;
    background: color-mix(in srgb, var(--lp-primary) 11%, transparent);
    color: var(--lp-primary);
    font-size: 1.25rem;
}

.lp-consent-title {
    margin: 0 0 .25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lp-text);
}

.lp-consent-text {
    margin: 0;
    font-size: .875rem;
    line-height: 1.6;
    color: var(--lp-text-secondary);
}

.lp-consent-close {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
    margin-left: auto;
    padding: .375rem .625rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    font-family: inherit;
    font-size: .75rem;
    font-weight: 500;
    color: var(--lp-text-secondary);
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.lp-consent-close:hover {
    background: color-mix(in srgb, var(--lp-text) 5%, transparent);
    color: var(--lp-text);
}

.lp-consent-close .material-symbols-outlined {
    font-size: 1.125rem;
    transition: transform .22s ease;
}

.lp-consent-close--open .material-symbols-outlined { transform: rotate(180deg); }

.lp-consent-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--lp-text) 9%, transparent);
}

.lp-consent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.lp-consent-list li {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    padding-left: .875rem;
    border-left: 2px solid color-mix(in srgb, var(--lp-primary) 30%, transparent);
}

.lp-consent-vendor { font-size: .8125rem; font-weight: 600; color: var(--lp-text); }

.lp-consent-purpose {
    font-size: .8125rem;
    line-height: 1.55;
    color: var(--lp-text-secondary);
}

.lp-consent-note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 1rem 0 0;
    padding: .75rem .875rem;
    border-radius: .875rem;
    background: color-mix(in srgb, var(--lp-text) 4%, transparent);
    font-size: .75rem;
    line-height: 1.55;
    color: var(--lp-text-secondary);
}

.lp-consent-note .material-symbols-outlined { font-size: 1rem; flex-shrink: 0; margin-top: .0625rem; }

.lp-consent-actions {
    display: flex;
    gap: .625rem;
    margin-top: 1.125rem;
}

.lp-consent-btn {
    flex: 1 1 auto;
    padding: .75rem 1.25rem;
    border-radius: .875rem;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, transform .12s ease;
}

.lp-consent-btn:active { transform: translateY(1px); }

/* "Recusar" reads as a real option, not as a way out that was made hard to find —
   which is the whole point of asking. */
.lp-consent-btn--ghost {
    background: none;
    border: 1px solid color-mix(in srgb, var(--lp-text) 18%, transparent);
    color: var(--lp-text);
}

.lp-consent-btn--ghost:hover { border-color: color-mix(in srgb, var(--lp-text) 32%, transparent); }

.lp-consent-btn--primary {
    background: var(--lp-primary);
    border: 1px solid var(--lp-primary);
    color: #fff;
}

.lp-consent-btn--primary:hover { background: color-mix(in srgb, var(--lp-primary) 88%, #000); }

.lp-consent-reopen {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .4375rem .875rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--lp-text) 12%, transparent);
    background: var(--lp-surface);
    box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--lp-text) 45%, transparent);
    font-family: inherit;
    font-size: .75rem;
    font-weight: 500;
    color: var(--lp-text-secondary);
    cursor: pointer;
    opacity: .82;
    transition: opacity .18s ease, color .18s ease;
}

.lp-consent-reopen:hover { opacity: 1; color: var(--lp-text); }
.lp-consent-reopen .material-symbols-outlined { font-size: 1rem; }

@media (max-width: 640px) {
    .lp-consent { padding: .625rem; }
    .lp-consent-card { padding: 1.125rem 1rem 1rem; border-radius: 1.25rem; }
    .lp-consent-icon { width: 2.125rem; height: 2.125rem; font-size: 1.0625rem; }
    .lp-consent-title { font-size: .9375rem; }
    .lp-consent-close-label { display: none; }
    .lp-consent-actions { flex-direction: column-reverse; }
}
