/* ── Document check strip ────────────────────────────────────
   Prominent FedEx-style "Verify a document" input. Sits between
   the marketing hero and the trust strip. Rendered by the
   DocumentCheckControl view component (RCL), styled here. */

@layer components {

    .c-doc-check {
        background: var(--color-surface-alt);
        border-top: 1px solid var(--color-line);
        border-bottom: 1px solid var(--color-line);
    }

    .c-doc-check__inner {
        max-width: 80rem;
        margin-inline: auto;
        padding: var(--space-7) clamp(var(--space-5), 4vw, var(--space-7));
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
    }

    .c-doc-check__label {
        /* Match the .c-hero__meta strong heading ("Verified by") used
           on the opposite side of the hero so both in-hero block
           labels share typography. */
        display: block;
        font-family: var(--font-display);
        font-size: var(--fs-body-sm);
        font-weight: 500;
        color: var(--color-ink);
    }

    .c-doc-check__form {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-3);
        align-items: stretch;
    }

    .c-doc-check__input {
        flex: 1 1 24rem;
        min-width: 0;
        padding: var(--space-4) var(--space-5);
        font-family: inherit;
        font-size: var(--fs-body-lg);
        color: var(--color-ink);
        background: var(--color-surface);
        border: 1px solid var(--color-line);
        border-radius: var(--radius-pill);
        transition: border-color var(--dur-fast) var(--ease),
                    box-shadow var(--dur-fast) var(--ease);
    }

    .c-doc-check__input::placeholder {
        color: var(--color-ink-mute);
    }

    .c-doc-check__input:focus-visible {
        outline: none;
        border-color: var(--color-accent);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
    }

    .c-doc-check__button {
        /* Inherit standard .c-button sizing so it matches the rest of
           the page. The strip variant's oversized input is handled by
           the input rule alone; the button stays at default height. */
    }

    .c-doc-check__error {
        min-height: 1.25rem;
        font-size: var(--fs-ui-sm);
        color: var(--color-accent-deep);
    }

    .c-doc-check__error:empty {
        display: none;
    }

    /* ── Actions-row variant — two shapes by viewport ──────────────
       When rendered inside .c-hero__actions the control has two
       layouts:
         narrow viewports  → full-width strip, sits on its own row
                             below the action buttons (thanks to
                             flex-basis: 100% forcing a line break).
         ≥1100 px          → fixed-width card pinned to the right of
                             the buttons row, with stacked form.
       Layout/column-placement inside the actions grid is owned by
       the app's hero CSS (.c-hero__actions). This file handles only
       the control's own shape. */
    .c-hero__actions .c-doc-check {
        flex-basis: 100%;
        width: 100%;
    }

    @media (min-width: 1100px) {
        .c-hero__actions .c-doc-check {
            flex-basis: auto;
            width: 22rem;
            background: var(--color-surface);
            border: 1px solid var(--color-line);
            border-radius: var(--radius-md);
        }

        .c-hero__actions .c-doc-check .c-doc-check__inner {
            max-width: none;
            padding: var(--space-4) var(--space-5);
        }

        .c-hero__actions .c-doc-check .c-doc-check__form {
            flex-direction: column;
            gap: var(--space-2);
        }

        .c-hero__actions .c-doc-check .c-doc-check__input {
            flex: 1 1 auto;
            width: 100%;
            padding: var(--space-3) var(--space-4);
            font-size: var(--fs-body);
        }

        .c-hero__actions .c-doc-check .c-doc-check__button {
            width: 100%;
            justify-content: center;
        }
    }
}
