/*
 * FunTimes Forms - frontend styles.
 *
 * Every rule is scoped under .ft-form-wrap so nothing here can reach the theme.
 * Class names mirror funtimes-forms/ft-form.css, the static prototype Eric
 * signed off on, so the rendered result matches what he already approved.
 *
 * This file is enqueued from the shortcode callback only. A page without the
 * shortcode never downloads it, which matters on a slow shared host.
 */

.ft-form-wrap {
    max-width: 780px;
    margin: 0 auto;
    color: #1c1c1c;
    font-size: 16px;
    line-height: 1.55;
}

.ft-form-wrap .ft-form-title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.ft-form-wrap .ft-lede {
    margin: 0 0 20px;
    color: #4a4a4a;
}

.ft-form-wrap .ft-notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-left: 4px solid #c8a24a;
    background: #fdf8ec;
}

.ft-form-wrap .ft-errsummary {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-left: 4px solid #b3261e;
    background: #fdecea;
    font-weight: 600;
}

.ft-form-wrap .ft-success {
    padding: 20px;
    border-left: 4px solid #2e7d32;
    background: #edf7ee;
}

/*
 * The honeypot. Moved off-canvas rather than display:none, because some bots
 * skip fields their headless browser reports as hidden. Also removed from the
 * tab order and from assistive technology, so no human meets it by accident.
 */
.ft-form-wrap .ft-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ft-form-wrap .ft-card {
    margin: 0 0 22px;
    padding: 22px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fff;
}

.ft-form-wrap .ft-sechead {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ededed;
}

.ft-form-wrap .ft-num {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #1c1c1c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.ft-form-wrap .ft-sechead h3 {
    margin: 0;
    font-size: 19px;
}

.ft-form-wrap .ft-groupband {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #f6f6f6;
}

.ft-form-wrap .ft-groupband h4 {
    margin: 0 0 4px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ft-form-wrap .ft-groupband p {
    margin: 0;
    font-size: 14px;
    color: #4a4a4a;
}

.ft-form-wrap .ft-legal {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

/* Fields. .ft-half pairs up on a wide viewport and stacks on a narrow one. */
.ft-form-wrap .ft-field {
    margin: 0 0 16px;
}

.ft-form-wrap .ft-field > label,
.ft-form-wrap .ft-field legend {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
}

.ft-form-wrap .ft-field fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.ft-form-wrap .ft-req {
    color: #b3261e;
}

.ft-form-wrap .ft-hint {
    display: block;
    margin: -2px 0 6px;
    font-size: 13px;
    color: #5c5c5c;
}

.ft-form-wrap input[type="text"],
.ft-form-wrap input[type="email"],
.ft-form-wrap input[type="tel"],
.ft-form-wrap input[type="url"],
.ft-form-wrap input[type="date"],
.ft-form-wrap select,
.ft-form-wrap textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c4c4c4;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.ft-form-wrap textarea {
    min-height: 130px;
    resize: vertical;
}

.ft-form-wrap input:focus,
.ft-form-wrap select:focus,
.ft-form-wrap textarea:focus,
.ft-form-wrap .ft-submit:focus {
    outline: 3px solid #2f6fd0;
    outline-offset: 1px;
}

.ft-form-wrap .ft-has-error input,
.ft-form-wrap .ft-has-error select,
.ft-form-wrap .ft-has-error textarea {
    border-color: #b3261e;
}

.ft-form-wrap .ft-error {
    display: block;
    margin: 6px 0 0;
    color: #b3261e;
    font-size: 13px;
    font-weight: 600;
}

.ft-form-wrap .ft-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.ft-form-wrap .ft-checks.ft-one {
    grid-template-columns: 1fr;
}

.ft-form-wrap .ft-checks label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
}

.ft-form-wrap .ft-checks input {
    margin-top: 4px;
}

.ft-form-wrap .ft-submit {
    padding: 13px 26px;
    border: 0;
    border-radius: 6px;
    background: #1c1c1c;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.ft-form-wrap .ft-submit:hover {
    background: #333;
}

/* Set by form.js when a showIf gate is closed. */
.ft-form-wrap [hidden] {
    display: none !important;
}

@media (min-width: 620px) {
    .ft-form-wrap .ft-card {
        display: flex;
        flex-wrap: wrap;
        gap: 0 18px;
    }

    .ft-form-wrap .ft-card > * {
        flex: 1 1 100%;
    }

    .ft-form-wrap .ft-field.ft-half {
        flex: 1 1 calc(50% - 9px);
    }
}

@media (max-width: 619px) {
    .ft-form-wrap .ft-checks {
        grid-template-columns: 1fr;
    }
}
