/* Contact Form 7 layout, loaded only on pages with a form (mu-plugins/help/forms.php) */
/* ─── CF7 Modern Form ──────────────────────────────────── */
.help-cf7-form { max-width: 640px; }

.help-cf7-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .help-cf7-row { grid-template-columns: 1fr; }
}

.help-cf7-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.help-cf7-row .help-cf7-field { margin-bottom: 0; }

/* CF7 auto-wraps content in <p> — reset and make it a flex column */
.help-cf7-field > p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
/* CF7 inserts <br> between label and input — hide it */
.help-cf7-field br { display: none; }

.help-cf7-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
    letter-spacing: 0.02em;
}
.help-cf7-required {
    color: var(--wp--preset--color--primary);
    margin-left: 2px;
}
.help-cf7-optional {
    font-weight: 400;
    color: var(--wp--preset--color--accent-4);
    font-size: 0.8125rem;
}

.help-cf7-input,
.help-cf7-select,
.help-cf7-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--wp--preset--color--accent-4);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--wp--preset--color--contrast);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.help-cf7-input::placeholder,
.help-cf7-textarea::placeholder {
    color: var(--wp--preset--color--accent-4);
    opacity: 1;
}
.help-cf7-input:focus,
.help-cf7-select:focus,
.help-cf7-textarea:focus {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary) 15%, transparent);
}

/* Custom select arrow */
.help-cf7-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234d6680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 40px;
    cursor: pointer;
    color: var(--wp--preset--color--contrast);
}
.help-cf7-select option[value=""] { color: var(--wp--preset--color--accent-4); }

.help-cf7-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.65;
}

/* Submit */
.help-cf7-submit {
    display: block;
    width: 100%;
    padding: 14px 28px;
    background: var(--wp--preset--color--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 8px;
}
.help-cf7-submit:hover { background: var(--wp--preset--color--primary-dark); }
.help-cf7-submit:active { transform: translateY(1px); }

/* Validation */
.wpcf7-form-control.wpcf7-not-valid {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192,57,43,.12) !important;
}
.wpcf7-not-valid-tip {
    font-size: 0.8125rem;
    color: #c0392b;
    margin-top: 4px;
    display: block;
}
div.wpcf7-response-output {
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 0.9375rem;
    margin: 20px 0 0;
    border: none !important;
}
.wpcf7 form.sent .wpcf7-response-output,
div.wpcf7-mail-sent-ok {
    background: #eafaf1;
    color: #1e7e34;
    border-left: 4px solid #27ae60 !important;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output,
div.wpcf7-mail-sent-ng,
div.wpcf7-aborted,
div.wpcf7-spam-blocked,
div.wpcf7-validation-errors {
    background: #fdf2f2;
    color: #922b21;
    border-left: 4px solid #c0392b !important;
}
/* Spinner while submitting */
.wpcf7 .ajax-loader { display: none; }

/* Required-fields note above the form */
.help-cf7-note {
    font-size: 0.875rem;
    color: var(--wp--preset--color--accent-4);
    margin: 0 0 20px;
}

/* Same gap after a two-column row as between single fields */
.help-cf7-row { margin-bottom: 20px; }
