/* The contact form (#451). Loaded after login.css and built from its parts: the top
   bar, .card, .login-card, .status, .email-input and .secondary-button. Only the form's
   own layout is here, and it uses login.css's colour variables: no new palette. */

/* One card, the width a form reads well at: login.css's <main> is a two-column grid. */
.contact-main {
    display: block;
    box-sizing: border-box;
    width: min(560px, 100%);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* After a send the form is hidden and the thanks shown; the display above would
   otherwise beat the hidden attribute (login.css's .email-form[hidden] is the same fix). */
.contact-form[hidden] {
    display: none;
}

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

.contact-field label {
    font-weight: 600;
    color: var(--slate-900);
}

.contact-form textarea.email-input {
    min-height: 140px;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
}

/* login.css styles .login-card p; the help line is smaller and sits under its field. */
.login-card .contact-help {
    font-size: 0.88rem;
    color: var(--gray-700);
}
.contact-help a {
    color: var(--blue-deep);
    font-weight: 600;
}

/* A box big enough for a thumb, and the whole line is the target. */
.contact-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 8px 0;
    font-weight: 600;
    color: var(--slate-900);
    cursor: pointer;
}
.contact-check input {
    width: 22px;
    height: 22px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--blue-dark);
}

/* Off screen rather than display:none, which some programs skip. aria-hidden and
   tabindex="-1" in the markup keep it from screen readers and the keyboard. */
.contact-trap {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* The one action on the page: filled, full width on a phone. */
.contact-send {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: #fff;
    min-height: 48px;
}
.contact-send:hover {
    border-color: var(--blue-deep);
}
.contact-send:focus-visible,
.contact-form textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .contact-send {
        width: 100%;
    }
    /* login.css takes the body's padding away on a phone; give the card its margin back. */
    .contact-main {
        padding: 16px;
    }
    .card.login-card {
        padding: 20px;
    }
}
