/* Honeypot — must match the Quality test's regex byte-for-byte. */
.hp-field { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }

/* Local Fira Sans Condensed — self-hosted, no external requests. */
@font-face {
    font-family: 'Fira Sans Condensed';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/assets/fira-sans-condensed-v10-latin-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Fira Sans Condensed';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fira-sans-condensed-v10-latin-700.woff2') format('woff2');
}

/* Mobile-first base styles. */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    margin: 0;
    line-height: 1.5;
    color: #222;
}

/* Headings and captions use the local Fira Sans Condensed. */
h1, h2, h3, h4, h5, h6 { font-family: 'Fira Sans Condensed', system-ui, sans-serif; font-weight: 700; }
.help, .privacy { font-family: 'Fira Sans Condensed', system-ui, sans-serif; font-weight: 300; }
/* Site header: business identity (left) + shop logo (right). Mobile-first.
   Content is capped to the same width as <main> and centered, so the business
   name's left edge lines up with the page content below it. */
.site-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}
.site-header__business { flex: 0 0 60%; min-width: 0; }
.business-name {
    font-family: 'Fira Sans Condensed', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.25;
}
.business-address {
    font-family: 'Fira Sans Condensed', system-ui, sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #555;
    margin-top: 0.35rem;
}
/* Logo container caps the logo so an oversized asset can't break the layout.
   Centered vertically against the business block, pinned to the right edge. */
.site-header__logo {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.site-header__logo img {
    max-width: 100%;
    max-height: 4rem;
    width: auto;
    height: auto;
}

main { max-width: 40rem; padding: 1rem; margin: 0 auto; }
form label { display: block; margin: 1rem 0; font-weight: 600; }
form input, form textarea { width: 100%; padding: 0.5rem; font-weight: 400; border: 1px solid #b9b9b9; border-radius: 2px; }
form textarea { resize: vertical; min-height: 6rem; }
/* Required-field marker on the label. */
.required { color: #c0392b; margin-left: 0.15rem; font-weight: 700; }

/* Inline, JS-free validation. :user-invalid only matches AFTER the user has
   edited+blurred the field or attempted to submit — never on initial load —
   so the form doesn't shout at people before they've typed anything. */
.field-error { display: none; font-size: 0.875rem; color: #c0392b; margin-top: 0.35rem; }
form input:user-invalid { border-color: #c0392b; }
form input:user-invalid ~ .field-error { display: block; }
/* Server-side error region (e.g. a rejected captcha) — shown on redirect-back,
   distinct from the CSS-only :user-invalid .field-error spans. */
.form-error { padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: 6px; background: #fdecea; color: #c0392b; font-size: 0.95rem; }
/* Primary submit button. */
button {
    margin-top: 1rem;
    padding: 0.75rem 1.75rem;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    background-color: #cc0066;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
button:hover { background-color: #b3005a; }
button:active { background-color: #99004d; }
button:focus-visible { outline: 3px solid #cc0066; outline-offset: 2px; }
/* Capped to the same content width as the header and <main>, and centered. */
footer { max-width: 40rem; margin: 2rem auto 0; padding: 1rem; border-top: 1px solid #ddd; }
footer ul { list-style: none; padding: 0; display: flex; gap: 1rem; }
.privacy { font-size: 0.875rem; margin-top: 0.5rem; }
/* Help text sits directly under its field, with no gap. */
.help { display: block; font-size: 0.875rem; color: #555; margin-top: 0; }

/* --- Confirmation page ---------------------------------------------------- */
/* Neutral receipt-confirmation badge. Confirms receipt (not gratitude/success);
   the green + check give reassurance without celebratory framing. */
.confirmation-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.85rem;
    background: #e7f6ec;
    color: #1e6b2f;
    border: 1px solid #bfe3cb;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}
.confirmation-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #1e7e34;
    color: #fff;
    font-size: 0.8rem;
    line-height: 1;
}

/* Label/value pairs: small muted label above a prominent value, no browser
   default <dd> indent. The reference number is the value worth keeping. */
.confirmation-details { margin: 1.5rem 0; }
.confirmation-details__row + .confirmation-details__row { margin-top: 1rem; }
.confirmation-details dt {
    font-family: 'Fira Sans Condensed', system-ui, sans-serif;
    font-weight: 300;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}
.confirmation-details dd {
    margin: 0.2rem 0 0;
    font-size: 1.0625rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.confirmation-reference {
    font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 1rem;
    word-break: break-all;
}

/* Small secondary button — overrides the global primary <button> styling. */
.copy-button {
    margin: 0;
    padding: 0.25rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #cc0066;
    background: #fff;
    border: 1px solid #cc0066;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.copy-button:hover { background: #fff0f6; }
.copy-button:active { background: #ffe3ef; }
.copy-button.is-copied { color: #1e6b2f; background: #e7f6ec; border-color: #1e7e34; }
