/* ============================================================
   BookingEngine Global Styles — Guest Portal Redesign
   Design System: Campground Pro (Claude Design handoff)
   ============================================================ */

:root {
    /* ---- Max width ---- */
    --be-max-width: 1360px;

    /* ---- Forest palette ---- */
    --be-forest-900: #0F2E22;
    --be-forest-800: #143826;
    --be-forest-700: #1B4332;
    --be-forest-600: #2D5A42;
    --be-forest-500: #4A7C5B;
    --be-forest-300: #8FB09B;
    --be-forest-100: #D8E4DC;
    --be-forest-50:  #EEF3EF;

    /* Aliases */
    --be-forest: var(--be-forest-700);
    --be-forest-mid: var(--be-forest-600);
    --be-forest-light: var(--be-forest-50);
    --be-forest-subtle: #f6faf7;

    /* ---- Amber palette ---- */
    --be-amber-700: #A8832E;
    --be-amber-600: #C99A38;
    --be-amber-500: #D4A843;
    --be-amber-300: #E8C778;
    --be-amber-100: #F4E4B8;
    --be-amber-50:  #FBF5E4;

    --be-amber: var(--be-amber-500);
    --be-amber-hover: var(--be-amber-600);

    /* ---- Bark palette (text) ---- */
    --be-bark-900: #2B241B;
    --be-bark-700: #4A3F2F;
    --be-bark-500: #786854;
    --be-bark-300: #B4A58E;

    /* ---- Neutral surfaces ---- */
    --be-beige-100: #F5F5F2;
    --be-beige-200: #ECEBE5;
    --be-beige-300: #DFDDD3;
    --be-cream:     #FAF9F5;
    --be-paper:     #FFFFFF;

    --be-bg: var(--be-beige-100);

    /* ---- Semantic ---- */
    --be-success: #3F7D5F;
    --be-danger:  #B0462E;
    --be-danger-surface: #FDF1EF;
    --be-danger-border:  #F0CAC3;
    --be-error:   #B0462E;
    --be-info:    #4A7C5B;
    --be-status-online: #6FD28A;

    /* ---- Status ---- */
    --be-status-confirmed:     var(--be-success);
    --be-status-confirmed-bg:  var(--be-forest-50);
    --be-status-pending:       var(--be-amber-700);
    --be-status-pending-bg:    var(--be-amber-50);
    --be-status-cancelled:     #6b7280;
    --be-status-cancelled-bg:  #f3f4f6;
    --be-status-checkedin:     #1558b0;
    --be-status-checkedin-bg:  #dbeafe;
    --be-status-checkedout:    #4b5563;
    --be-status-checkedout-bg: #e5e7eb;

    /* ---- Typography ---- */
    --be-font-sans:  'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --be-font-serif: 'Fraunces', 'Plus Jakarta Sans', Georgia, serif;
    --be-font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --be-font: var(--be-font-sans);

    /* ---- Radius ---- */
    --be-radius-xs: 6px;
    --be-radius-sm: 10px;
    --be-radius-md: 14px;
    --be-radius-lg: 20px;
    --be-radius-xl: 28px;
    --be-radius-full: 999px;

    /* ---- Shadows ---- */
    --be-shadow-sm: 0 1px 2px rgba(27,67,50,.06), 0 1px 3px rgba(27,67,50,.04);
    --be-shadow-md: 0 4px 12px rgba(27,67,50,.08), 0 2px 4px rgba(27,67,50,.05);
    --be-shadow-lg: 0 16px 40px rgba(27,67,50,.12), 0 4px 12px rgba(27,67,50,.06);
    --be-shadow-xl: 0 24px 64px rgba(27,67,50,.18), 0 8px 20px rgba(27,67,50,.08);

    /* ── Senior-friendly scale ──────────────────────────────────────────────────
       GUEST_BOOKING_UX_ARD.md AD-GB-06; PRD REQ-NF-01 to REQ-NF-03, DEC-07.

       The guest portal's primary user is a first-time, non-technical guest of about 60 or
       over. These are floors, not suggestions, and they apply to the whole portal rather
       than the five booking screens alone: a guest who reads 18px through booking and 13px
       on the cancellation page has not been given a legible product.

       No page may override them downwards (ARD C-04). A page that needs smaller text has a
       layout problem, not a type problem — and the doc-check's --strict lint fails the build
       on any new literal below 16px in these files. */
    --be-text-body:   18px;  /* body copy. was 15px */
    --be-text-helper: 16px;  /* helper, caption, label, secondary. was 11-13px */
    --be-text-lead:   20px;  /* the one lead paragraph per screen */
    --be-tap:         48px;  /* minimum interactive target, both axes */
    --be-line-body:   1.6;

    /* Legacy aliases */
    --be-card-radius: var(--be-radius-md);
    --be-card-shadow: var(--be-shadow-sm);
    --be-card-shadow-hover: var(--be-shadow-lg);
    --be-transition: 0.15s ease;
}

/* ============================================================
   Base reset
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--be-font-sans);
    font-feature-settings: 'ss01', 'cv11';
    color: var(--be-bark-900);
    background: var(--be-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* PRD REQ-NF-01. Set on body so anything that inherits — and most of this sheet does —
       starts at the readable floor rather than at the browser's 16px. */
    font-size: var(--be-text-body);
    line-height: var(--be-line-body);
}

/* PRD REQ-NF-09. Respected globally rather than per-animation: a guest who has asked their
   operating system for less motion should not have to be remembered by each component that
   moves. Animation is never the only confirmation of a completed action. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Available to a screen reader, invisible on screen. Used where a state is carried by shape or
   fill for sighted guests and needs a word for everyone else (PRD REQ-NF-08). Not display:none
   — that removes it from the accessibility tree too, which is the opposite of the point. */
.be-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* FluentUI components ship their own type scale, and it is below our floor: input labels at
   14px, message-bar text at 12px. Those are rendered inside the components, so no page
   stylesheet reaches them and the migration script cannot see them either — the E2E
   computed-style sweep is what found them. REQ-NF-01, REQ-NF-02. */
.fluent-input-label,
.fluent-messagebar-message,
fluent-text-field::part(label),
fluent-select::part(label),
fluent-number-field::part(label) {
    font-size: var(--be-text-helper) !important;
}

/* !important, reluctantly. FluentUI sets these from its own design-token layer at a
   specificity a page stylesheet cannot beat, and the descendant selectors cover the unclassed
   <span>s Fluent renders inside message bars and labels. The alternative is overriding Fluent's
   design tokens wholesale, which would change every operator-facing screen in the PMS to fix
   six guest-facing ones. */
.fluent-typography,
fluent-text-field,
fluent-number-field,
fluent-select,
fluent-option,
fluent-message-bar,
fluent-message-bar *,
.fluent-messagebar-content *,
fluent-badge,
fluent-badge *,
fluent-button,
fluent-button * {
    /* helper, not body. Fluent's message bar lays its content out on one line, so pushing it to
       18px sent it past the right edge of a 375px viewport — REQ-NF-06 losing to REQ-NF-01.
       16px clears the legibility floor and fits. Badges and buttons render their own inner
       <span> below the floor too, and only a descendant selector reaches those. */
    font-size: var(--be-text-helper) !important;
}

/* Fluent's message bar and its children assume they can be as wide as their content. min-width:0
   lets them shrink inside a flex parent instead of forcing the page wider (REQ-NF-06). */
fluent-message-bar,
fluent-message-bar *,
.fluent-messagebar-message {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Fluent's info message bar renders its text at a tint that axe measures below 4.5:1 against
   its own tinted background. It carries the site-selection-fee disclosure on the results page,
   which is the last sentence in this product that should be hard to read. REQ-NF-04. */
.fluent-messagebar-message,
.fluent-messagebar-message * {
    color: var(--be-bark-900) !important;
}

/* Long unbroken strings — a promo code, an email, a park name — must wrap rather than widen the
   page. Applied at the container level so no future element has to remember. */
.be-page-container,
.be-page-container--narrow {
    overflow-wrap: break-word;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   Layout containers
   ============================================================ */

.be-page-container {
    max-width: var(--be-max-width);
    margin: 0 auto;
    padding: 48px 28px;
}

.be-page-container--narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 28px;
}

@media (max-width: 600px) {
    .be-page-container,
    .be-page-container--narrow {
        padding: 24px 16px;
    }
}

/* ============================================================
   Typography classes
   ============================================================ */

.be-h-display {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: clamp(36px, 4.6vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--be-forest-900);
    margin: 0;
}

.be-h-title {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--be-forest-900);
    margin: 0;
}

.be-h-section {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.01em;
    color: var(--be-forest-900);
    margin: 0;
}

.be-eyebrow {
    font-size: var(--be-text-helper);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--be-forest-500);
    margin-bottom: 8px;
}

.be-sub {
    color: var(--be-bark-500);
    font-size: var(--be-text-body);
    line-height: 1.55;
}

/* Legacy heading aliases */
.be-page-heading {
    font-family: var(--be-font-serif);
    font-weight: 500;
    font-size: clamp(32px, 4vw, 42px);
    color: var(--be-forest-900);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.be-section-heading {
    font-size: var(--be-text-helper);
    font-weight: 700;
    color: var(--be-forest-500);
    margin: 0 0 14px 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================================
   Cards
   ============================================================ */

.be-card {
    background: var(--be-paper);
    border-radius: var(--be-radius-md);
    box-shadow: var(--be-shadow-sm);
    border: 1px solid rgba(27,67,50,.06);
    overflow: hidden;
}

.be-card--hover {
    transition: box-shadow var(--be-transition), transform var(--be-transition);
    cursor: pointer;
}

.be-card--hover:hover {
    box-shadow: var(--be-shadow-lg);
    transform: translateY(-2px);
}

/* ============================================================
   Buttons
   ============================================================ */

/* REQ-GR-25 / ARD AD-GR-05. This reset used to live in PropertyLanding.razor.css, where CSS
   isolation compiled it to `.be-card-hit[b-xxxxx]` — (0,2,0) — and it therefore beat
   `.be-btn-primary` at (0,1,0) on the one element that carries both
   (`class="be-btn be-btn-primary be-card-hit"`), silently stripping the button's fill, its
   text colour AND its 12px/20px padding.

   Here in the shared sheet the two rules are equal-specificity, so ordinary source order
   decides — and everything below this point wins. The bare `.be-card-hit` (the site-type
   heading's button) still gets the full reset because nothing else claims those properties on
   it. The reset must therefore stay ABOVE the .be-btn families; moving it down re-creates the
   bug it fixes. */
.be-card-hit {
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.be-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    /* PRD REQ-NF-03. Was ~41px tall from padding alone, which is under the floor for a guest
       with an unsteady hand on a phone. min-height rather than a fixed height so a button
       whose label wraps still grows. */
    min-height: var(--be-tap);
    border-radius: var(--be-radius-sm);
    font-weight: 600;
    font-size: var(--be-text-body);
    border: none;
    transition: all var(--be-transition);
    cursor: pointer;
    /* REQ-GR-19, REQ-GR-20 / ARD AD-GR-04.

       This was `white-space: nowrap` with no overflow treatment — and fourteen components pin
       a .be-btn to a fixed or full width. A nowrap label wider than its box paints outside it,
       and because justify-content is center the spill goes out BOTH ends. Measured: the
       stay-type card CTA "Choose a partial Hookup RV Site" needed 318px in a 235px box and
       rendered as "oose a partial Hookup RV S".

       Wrapping rather than truncating, because min-height above was chosen precisely so a
       wrapped label still grows the button, and because a clipped ACTION label is worse than a
       two-line one. `anywhere` rather than `break-word` so a single long operator-supplied word
       breaks instead of overflowing on its own.

       Truncation is used only where the box genuinely cannot grow — the search bar's closed
       value, which handles it locally (AD-GR-06). */
    white-space: normal;
    overflow-wrap: anywhere;
}

/* REQ-GR-22 — an icon beside a label never deforms; the label yields first. A flex item
   defaults to flex-shrink:1, so the glyph squashed before the text did and a lock or calendar
   icon rendered as an oval. Applied to the base classes rather than per component, so a button
   added later inherits it. */
.be-btn > svg,
.be-btn > fluent-icon,
.be-btn > span > svg {
    flex: none;
}

/* PRD REQ-NF-03 across the interactive surface. Applied here rather than per-component so a
   control added later inherits the floor instead of having to remember it. */
.be-btn,
.be-icon-btn,
.bgp-stepper-btn {
    min-width: var(--be-tap);
    min-height: var(--be-tap);
}

/* Links that behave as controls. PRD REQ-NF-03 lists "links that function as buttons", and
   these are exactly that — footer links, the header brand and card overlays. They were 23–46px
   tall, which is a real miss for the guest this portal is for. inline-flex because min-height
   does nothing to an inline element.

   `.be-nav-link`, `.sr-field-btn` and the date picker's controls used to be listed here too.
   Each is styled by a scoped sheet that names the same class, so the scoped rule at (0,2,0)
   decided the outcome and this rule only appeared to be in charge (ARD AD-GR-05). Their floors
   now sit in the sheet that owns them, where they can be read next to the rest of the
   component. */
.be-footer__link,
.be-header__brand,
.be-card-hit,
.sr-back-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--be-tap);
}

/* A flex item's default min-width is auto, so it refuses to shrink below its content and pushes
   the page wider instead — max-width on the child never gets a say. This is what put the
   landing hero's copy 82px off the left edge of a 375px viewport once the type scale went up.
   REQ-NF-06. */
.lp-hero__text,
.lp-welcome__text,
.be-type-section__content-col {
    min-width: 0;
}

.be-btn-primary {
    background: var(--be-forest-700);
    color: var(--be-cream);
    box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--be-shadow-sm);
}

.be-btn-primary:hover {
    background: var(--be-forest-800);
    box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--be-shadow-md);
    transform: translateY(-1px);
}

.be-btn-gold {
    background: linear-gradient(180deg, var(--be-amber-500) 0%, var(--be-amber-600) 100%);
    color: var(--be-forest-900);
    box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 8px rgba(212,168,67,.35);
}

.be-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 6px 16px rgba(212,168,67,.45);
}

.be-btn-ghost {
    background: transparent;
    color: var(--be-forest-700);
    border: 1px solid var(--be-forest-100);
}

.be-btn-ghost:hover {
    background: var(--be-forest-50);
    border-color: var(--be-forest-300);
}

/* The results page's "Show more" control asks for this and nothing defined it, so it rendered
   as a bare `.be-btn` — no fill, no border, indistinguishable from body text on the beige
   ground. Secondary means "a real action, but not the one we are steering you to": the ghost
   button's restraint with enough surface to read as a control. */
.be-btn-secondary {
    background: var(--be-beige-100);
    color: var(--be-forest-800);
    border: 1px solid var(--be-beige-300);
}

.be-btn-secondary:hover {
    background: var(--be-forest-50);
    border-color: var(--be-forest-300);
    color: var(--be-forest-900);
}

.be-btn-dark {
    background: var(--be-bark-900);
    color: var(--be-cream);
}

.be-btn-dark:hover {
    background: var(--be-forest-900);
}

.be-btn-danger {
    background: var(--be-danger);
    color: var(--be-cream);
}

.be-btn-danger:hover {
    filter: brightness(1.1);
}

.be-btn-lg {
    padding: 15px 26px;
    font-size: var(--be-text-body);
    border-radius: 12px;
}

.be-btn-sm {
    padding: 8px 14px;
    font-size: var(--be-text-helper);
    border-radius: 8px;
}

.be-btn:disabled {
    background: var(--be-beige-200);
    color: var(--be-bark-300);
    cursor: default;
    box-shadow: none;
    transform: none;
    border-color: transparent;
}

/* ============================================================
   Chips / badges
   ============================================================ */

.be-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--be-beige-200);
    border-radius: var(--be-radius-full);
    font-size: var(--be-text-helper);
    font-weight: 600;
    color: var(--be-bark-700);
}

.be-chip-forest {
    background: var(--be-forest-50);
    color: var(--be-forest-700);
}

.be-chip-amber {
    background: var(--be-amber-50);
    color: var(--be-amber-700);
}

/* The applied-promo chip asks for this and nothing defined it, so a code that HAD applied
   rendered identically to one that had not — telling those two apart is the chip's only job.
   Deliberately NOT --be-success (#3F7D5F): on --be-forest-50 that measures 4.34:1, under
   REQ-GR-NF-06's 4.5. --be-forest-700 clears it at 9.9:1 and matches the 700-weight-on-50
   pairing the amber chip already uses. The ring is what separates it from .be-chip-forest.
   Never colour alone (REQ-GR-49) — the chip's own text says which state it is. */
.be-chip-success {
    background: var(--be-forest-50);
    color: var(--be-forest-700);
    box-shadow: inset 0 0 0 1px var(--be-forest-300);
}

.be-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--be-radius-xs);
    font-size: var(--be-text-helper);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.be-badge--confirmed { background: var(--be-status-confirmed-bg); color: var(--be-status-confirmed); }
.be-badge--pending   { background: var(--be-status-pending-bg);   color: var(--be-status-pending); }
.be-badge--cancelled { background: var(--be-status-cancelled-bg); color: var(--be-status-cancelled); }
.be-badge--checkedin { background: var(--be-status-checkedin-bg); color: var(--be-status-checkedin); }
.be-badge--checkedout { background: var(--be-status-checkedout-bg); color: var(--be-status-checkedout); }

/* ============================================================
   Forms
   ============================================================ */

.be-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.be-field label {
    font-size: var(--be-text-helper);
    font-weight: 600;
    color: var(--be-bark-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.be-input,
.be-select {
    padding: 12px 14px;
    background: white;
    border: 1px solid var(--be-beige-300);
    border-radius: var(--be-radius-sm);
    font-size: var(--be-text-body);
    color: var(--be-bark-900);
    transition: all var(--be-transition);
    outline: none;
    font-family: inherit;
}

.be-input:focus,
.be-select:focus {
    border-color: var(--be-forest-500);
    box-shadow: 0 0 0 3px var(--be-forest-50);
}

.be-input::placeholder {
    color: var(--be-bark-300);
}

.be-field-error {
    display: block;
    color: var(--be-danger);
    font-size: var(--be-text-helper);
    margin-top: 2px;
    line-height: 1.3;
}

/* ============================================================
   Divider
   ============================================================ */

.be-divider {
    height: 1px;
    background: var(--be-beige-300);
    margin: 0;
    border: 0;
}

/* ============================================================
   Focus indicators (accessibility)
   ============================================================ */

*:focus-visible {
    outline: 2px solid var(--be-forest-500);
    outline-offset: 2px;
}

.be-card--hover:focus-visible {
    box-shadow: var(--be-shadow-lg);
    outline: 2px solid var(--be-forest-500);
    outline-offset: 2px;
}

/* ============================================================
   Loading & empty states
   ============================================================ */

.be-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 16px;
}

.be-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 12px;
}

/* ============================================================
   Utility
   ============================================================ */

.be-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--be-text-helper);
    font-weight: 500;
    color: var(--be-bark-700);
    text-decoration: none;
    margin-bottom: 16px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color var(--be-transition);
}

.be-back-link:hover {
    color: var(--be-forest-700);
}

.be-price-accent {
    color: var(--be-forest-700);
    font-weight: 700;
    font-family: var(--be-font-serif);
}

.be-text-hint {
    color: var(--be-bark-500);
}

.be-mono {
    font-family: var(--be-font-mono);
    letter-spacing: 0.04em;
}

/* ============================================================
   Timer animation
   ============================================================ */

@keyframes be-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes be-pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.be-timer-urgent {
    animation: be-pulse-red 1.2s ease-in-out infinite;
    color: var(--be-danger) !important;
    font-weight: 700;
}

/* ============================================================
   Fade-in & screen transitions
   ============================================================ */

@keyframes be-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.be-fade-in {
    animation: be-fade-in 0.25s ease;
}

/* Scroll-triggered reveal */
.be-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.be-reveal.be-visible {
    opacity: 1;
    transform: translateY(0);
}

.be-reveal-delay-1 { transition-delay: 0.1s; }
.be-reveal-delay-2 { transition-delay: 0.2s; }
.be-reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   Skeleton helpers
   ============================================================ */

.be-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.be-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   FluentUI component overrides — brand polish
   ============================================================ */

fluent-button[appearance="accent"],
fluent-button[appearance="accent"]::part(control) {
    border-radius: var(--be-radius-sm);
    font-weight: 600;
    letter-spacing: -0.01em;
}

fluent-text-field::part(root),
fluent-text-area::part(root),
fluent-number-field::part(root),
fluent-select::part(control) {
    border-radius: var(--be-radius-sm);
}

fluent-text-field:focus-within::part(root),
fluent-text-area:focus-within::part(root),
fluent-number-field:focus-within::part(root) {
    border-color: var(--be-forest-500);
    box-shadow: 0 0 0 1px var(--be-forest-500);
}

/* ============================================================
   Scrollbar
   ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(27,67,50,0.18);
    border-radius: 10px;
    border: 2px solid var(--be-beige-100);
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(27,67,50,0.32);
    background-clip: content-box;
    border: 2px solid var(--be-beige-100);
}

/* REQ-GR-63 — the back control on the chrome-less legal pages. They keep EmptyLayout for the
   compliance reviewer's cold open; this is the guest's way back into their booking. */
.be-legal-back {
    max-width: var(--be-max-width);
    margin: 0 auto;
    padding: 20px 24px 0;
}

@media (max-width: 600px) {
    .be-legal-back { padding: 16px 16px 0; }
}

/* ── The outcome panels TR6 introduced ────────────────────────────────────────────────────
   Shared here rather than per page: all five say the same kind of thing — "here is what
   actually happened, and it is not going away until you have read it" — and REQ-GR-41 turns
   on them being persistent, not on which page they sit in. */

.be-outcome-panel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    margin: 16px 0;
    border-radius: var(--be-radius-md);
    border: 1px solid var(--be-beige-300);
    background: var(--be-paper);
    /* An operator name or a booking number never widens the panel past its container. */
    min-width: 0;
    overflow-wrap: anywhere;
}

.be-outcome-panel > svg,
.be-outcome-panel > fluent-icon {
    flex: none;
    margin-top: 2px;
}

.be-outcome-panel__body { flex: 1; min-width: 0; }

.be-outcome-panel__title {
    margin: 0;
    font-weight: 600;
    font-size: var(--be-text-body);
}

.be-outcome-panel__detail {
    margin: 6px 0 0;
    font-size: var(--be-text-helper);
    color: var(--be-bark-500);
}

/* Something the guest must act on, and money has usually already moved. */
.be-outcome-panel--attention {
    border-color: var(--be-danger-border);
    background: var(--be-danger-surface);
}

.co-postcharge,
.mod-postcharge,
.be-cancel-outcome--partial {
    border-color: var(--be-danger-border);
    background: var(--be-danger-surface);
}

.co-postcharge,
.mod-postcharge,
.be-cancel-outcome,
.co-awaiting,
.rd-msg-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    margin: 16px 0;
    border-radius: var(--be-radius-md);
    border: 1px solid var(--be-beige-300);
    background: var(--be-paper);
    min-width: 0;
    overflow-wrap: anywhere;
}

.co-postcharge > svg, .mod-postcharge > svg, .be-cancel-outcome > svg,
.co-awaiting > svg, .rd-msg-error > svg,
.co-postcharge > fluent-icon, .mod-postcharge > fluent-icon,
.be-cancel-outcome > fluent-icon, .co-awaiting > fluent-icon, .rd-msg-error > fluent-icon {
    flex: none;
    margin-top: 2px;
}

.be-cancel-outcome__body { flex: 1; min-width: 0; }

.be-cancel-outcome__title {
    margin: 0;
    font-weight: 600;
    font-size: var(--be-text-body);
}

.be-cancel-outcome__detail {
    margin: 6px 0 0;
    font-size: var(--be-text-helper);
    color: var(--be-bark-500);
}

.be-cancel-outcome__dismiss {
    flex: none;
    min-width: var(--be-tap);
    min-height: var(--be-tap);
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    border-radius: var(--be-radius-sm);
    color: var(--be-bark-500);
    cursor: pointer;
}

.be-cancel-outcome__dismiss:hover { background: var(--be-beige-100); }

.rd-msg-error {
    /* Sits directly under the composer whose send failed, so it reads as belonging to it. */
    margin: 8px 0 0;
    border-color: var(--be-danger-border);
    background: var(--be-danger-surface);
    font-size: var(--be-text-helper);
}

/* Not a failure — the money is in and we are finishing up. Calm, not alarming. */
.co-awaiting {
    border-color: var(--be-forest-100);
    background: var(--be-forest-subtle);
}

/* Belongs to the Show-more button, not to the page: a failed extra page must not look like
   the whole result set failed. */
.sr-loadmore__error {
    margin: 10px auto 0;
    max-width: 46ch;
    text-align: center;
    font-size: var(--be-text-helper);
    color: var(--be-danger);
}

@media (max-width: 600px) {
    .co-postcharge, .mod-postcharge, .be-cancel-outcome, .co-awaiting, .rd-msg-error {
        padding: 14px;
        margin-left: 0;
        margin-right: 0;
    }
}
