/*
 * Contact Us - Tier 2 page stylesheet.
 *
 * The form controls here are deliberately not the shared .form-control
 * vocabulary: the approved design gives this page uppercase, letter-spaced
 * field labels and a softer 0.875rem control radius, and it is the only page
 * with a full-height textarea. Buttons, the spinner, .field-error, .is-hidden,
 * and the card surface itself are all Tier 1 and are not repeated.
 *
 * Responsive breakpoints are scoped to `screen` so they cannot reach a printed
 * page.
 */

.contact-page {
    width: min(100%, 72rem);
    margin-inline: auto;
}

/* Form first, guidance beside it; below 52rem the guidance moves above the
   form, because knowing what to include is only useful before you type. */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
    align-items: start;
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

.contact-card,
.support-card {
    border: 1px solid hsl(var(--border));
    border-radius: 1.5rem;
    background: hsl(var(--card));
    box-shadow: var(--shadow-card);
}

.contact-card { padding: clamp(1.25rem, 3vw, 2rem); }

.support-card { padding: clamp(1.25rem, 3vw, 1.75rem); }

/* ── Fields ──────────────────────────────────────────────────────────── */
.contact-field label {
    display: block;
    margin-bottom: 0.45rem;
    color: hsl(var(--foreground));
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    border: 1px solid hsl(var(--input));
    border-radius: 0.875rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.contact-field input,
.contact-field select {
    min-height: 3rem;
    padding: 0.75rem 0.875rem;
}

.contact-field textarea {
    min-height: 10rem;
    padding: 0.875rem;
    line-height: 1.55;
    resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder { color: hsl(var(--muted-foreground) / 0.78); }

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    border-color: var(--teal-deep);
    background: hsl(var(--card));
    box-shadow: 0 0 0 3px rgb(13 92 117 / 15%);
}

.contact-field [aria-invalid="true"] {
    border-color: hsl(var(--destructive));
    box-shadow: 0 0 0 3px hsl(var(--destructive) / 0.12);
}

/* Additive to the Tier 1 .field-error: the slot holds its line whether or not
   it has text, so revealing a message cannot shift the field below it. */
.contact-field .field-error {
    min-height: 1.1rem;
    margin-top: 0.375rem;
    font-weight: 600;
}

/* ── Guidance card ───────────────────────────────────────────────────── */
.support-icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 0.875rem;
    background: hsl(var(--accent));
    color: var(--teal-deep);
}

.support-row + .support-row { border-top: 1px solid hsl(var(--border)); }

/* ── Server message banner ───────────────────────────────────────────── */
.status-banner {
    display: flex;
    border: 1px solid;
    border-radius: 1rem;
    padding: 0.875rem 1rem;
}

.status-banner.is-success {
    border-color: hsl(var(--success) / 0.3);
    background: hsl(var(--success) / 0.08);
    color: hsl(var(--success-text));
}

.status-banner.is-error {
    border-color: hsl(var(--destructive) / 0.3);
    background: hsl(var(--destructive) / 0.08);
    color: hsl(var(--destructive-text));
}

/* ── Sending state ───────────────────────────────────────────────────── */
.is-busy .send-label { opacity: 0; }

.is-busy .send-spinner { display: inline-block !important; }

@media screen and (max-width: 52rem) {
    .contact-layout { grid-template-columns: 1fr; }
    .support-card { order: -1; }
}

@media screen and (max-width: 36rem) {
    .contact-card,
    .support-card { border-radius: 1.25rem; }

    .contact-field textarea { min-height: 8rem; }
}

/* The message is the deliverable; the guidance card and the shell are not. */
@media print {
    .contact-layout { display: block; }
    .contact-card { box-shadow: none; }
    .support-card { display: none; }
}
