/*
 * The contact forms.
 *
 * Deliberately plain. This renders inside the shop's theme, so it inherits fonts and colours rather
 * than bringing its own — a form that looks like the CRM would look like a different website. Only
 * layout, spacing and the states the theme has no opinion about are set here.
 */

.sbst-contact {
    max-width: 42rem;
}

.sbst-contact[data-variant="quick"] {
    max-width: 28rem;
}

.sbst-contact-title {
    margin: 0 0 1rem;
}

.sbst-contact-row {
    margin: 0 0 1rem;
}

.sbst-contact-row > label,
.sbst-contact-row legend {
    display: block;
    margin: 0 0 .35rem;
    font-weight: 600;
}

.sbst-contact-row input[type="text"],
.sbst-contact-row input[type="email"],
.sbst-contact-row select,
.sbst-contact-row textarea {
    display: block;
    width: 100%;
    padding: .55rem .65rem;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #c9ced8;
    border-radius: 4px;
}

.sbst-contact-row textarea {
    resize: vertical;
    min-height: 6rem;
}

.sbst-contact-row input:focus-visible,
.sbst-contact-row select:focus-visible,
.sbst-contact-row textarea:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

/* Two boxes side by side where they read as one thing — a first and last name. */
.sbst-contact-split {
    display: grid;
    gap: 1rem;
}

@media (min-width: 34rem) {
    .sbst-contact-split { grid-template-columns: 1fr 1fr; }
    .sbst-contact-split > .sbst-contact-row { margin-bottom: 0; }
}

.sbst-contact-row fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.sbst-contact-choice {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .3rem;
    font-weight: 400;
}

.sbst-contact-choice input {
    margin: 0;
}

/*
 * Two answers that belong on one line.
 *
 * Yes and No are a single question with a single short answer, and stacking them makes the form look
 * longer than it is. The repair issues stay stacked — three options of unequal length read worse in a
 * row, and they wrap badly on a phone.
 */
.sbst-contact-inline .sbst-contact-choice {
    display: inline-flex;
    margin: 0 1.25rem .3rem 0;
}

.sbst-contact-req {
    color: #b3261e;
}

.sbst-contact-submit {
    padding: .6rem 1.4rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sbst-contact-submit:disabled {
    opacity: .6;
    cursor: default;
}

.sbst-contact-alert {
    margin: 0 0 1rem;
    padding: .6rem .75rem;
    border-radius: 4px;
    border-left: 3px solid;
}

.sbst-contact-alert.is-error {
    color: #7a1b14;
    background: #fdecea;
    border-color: #b3261e;
}

.sbst-contact-alert.is-success {
    color: #14532d;
    background: #e8f5ec;
    border-color: #1d7a37;
}

.sbst-contact-thanks {
    padding: 1rem 1.1rem;
    background: #e8f5ec;
    border-left: 3px solid #1d7a37;
    border-radius: 4px;
}

.sbst-contact-notice {
    padding: .85rem 1rem;
    background: #f4f5f7;
    border-left: 3px solid #c9ced8;
    border-radius: 4px;
}

/*
 * The honeypot.
 *
 * Off-screen rather than display:none — some bots skip anything the CSS hides outright, and this one
 * is meant to be found and filled in. It is out of the tab order and hidden from screen readers in the
 * markup, so nobody using the form can reach it either way.
 */
.sbst-contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
