/**
 * Contact Form 7 – User Consent form
 * Targets .user-consent-form wrapper and default CF7 markup inside page content.
 */

.page-content-section .entry-content .wpcf7,
.page-content-section .wpcf7 {
    max-width: 100%;
}

.page-content-section .user-consent-form,
.page-content-section .wpcf7-form.user-consent-form,
.page-content-section .entry-content > .wpcf7 {
    max-width: 720px;
    margin: 0 auto;
}

/* Reset CF7 paragraph spacing */
.page-content-section .user-consent-form p,
.page-content-section .wpcf7-form p {
    margin: 0 0 22px;
}

.page-content-section .user-consent-form p:last-child,
.page-content-section .wpcf7-form p:last-child {
    margin-bottom: 0;
}

/* Field blocks (when using CF7 wrapper divs) */
.page-content-section .consent-field {
    margin-bottom: 22px;
}

.page-content-section .consent-field-full {
    width: 100%;
}

.page-content-section .consent-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 22px;
}

.page-content-section .consent-field-half {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
    margin-bottom: 0;
}

/* Labels */
.page-content-section .user-consent-form label,
.page-content-section .wpcf7-form label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #0b2f5b;
    line-height: 1.4;
    margin-bottom: 8px;
}

.page-content-section .consent-field-label,
.page-content-section .user-consent-form .consent-field-label {
    font-size: 15px;
    font-weight: 600;
    color: #0b2f5b;
    margin: 0 0 10px;
}

.page-content-section .required,
.page-content-section .wpcf7-form .required {
    color: #d63638;
    font-weight: 600;
}

/* Text inputs */
.page-content-section .wpcf7-form-control-wrap input[type="text"],
.page-content-section .wpcf7-form-control-wrap input[type="email"],
.page-content-section .wpcf7-form-control-wrap input[type="tel"],
.page-content-section .wpcf7-form-control-wrap input[type="url"],
.page-content-section .wpcf7-form-control-wrap textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #0b2f5b;
    background-color: #f3f4f6;
    border: 1px solid #e0e4e8;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.page-content-section .wpcf7-form-control-wrap input:focus,
.page-content-section .wpcf7-form-control-wrap textarea:focus {
    background-color: #fff;
    border-color: #feaa19;
}

.page-content-section .wpcf7-form-control-wrap input::placeholder,
.page-content-section .wpcf7-form-control-wrap textarea::placeholder {
    color: #9aa3ad;
    opacity: 1;
}

/* Two-column row: email + phone (wrapper or adjacent paragraphs) */
.page-content-section .consent-field-row .wpcf7-form-control-wrap,
.page-content-section .consent-field-row input {
    width: 100%;
}

.page-content-section .wpcf7-form > p:has(input[type="email"]),
.page-content-section .wpcf7-form > p:has(input[type="tel"]) {
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .page-content-section .wpcf7-form:not(.user-consent-form) > p:has(input[type="email"]) {
        display: inline-block;
        width: calc(50% - 12px);
        margin-right: 20px;
        vertical-align: top;
    }

    .page-content-section .wpcf7-form:not(.user-consent-form) > p:has(input[type="tel"]) {
        display: inline-block;
        width: calc(50% - 12px);
        vertical-align: top;
    }
}

/* Checkbox / acceptance groups */
.page-content-section .consent-checkbox-group {
    margin-bottom: 28px;
}

.page-content-section .wpcf7-acceptance,
.page-content-section .consent-checkbox-group .wpcf7-form-control-wrap {
    display: block;
}

.page-content-section .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.page-content-section .wpcf7-acceptance input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    accent-color: #0b2f5b;
    cursor: pointer;
}

.page-content-section .wpcf7-acceptance .wpcf7-list-item-label {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    color: #5d6576;
}

.page-content-section .wpcf7-acceptance .wpcf7-list-item-label a {
    color: #0b2f5b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-content-section .wpcf7-acceptance .wpcf7-list-item-label a:hover {
    color: #feaa19;
}

/* Submit */
.page-content-section .consent-submit,
.page-content-section .wpcf7-form p:has(input[type="submit"]) {
    margin-top: 10px;
    margin-bottom: 0;
    text-align: left;
}

.page-content-section .wpcf7-submit,
.page-content-section input.wpcf7-submit,
.page-content-section .consent-submit input[type="submit"] {
    display: inline-block;
    min-width: 140px;
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff !important;
    background-color: #0b2f5b !important;
    border: 2px solid #0b2f5b !important;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.page-content-section .wpcf7-submit:hover,
.page-content-section input.wpcf7-submit:hover {
    background-color: #feaa19 !important;
    border-color: #feaa19 !important;
    color: #0b2f5b !important;
}

/* Validation */
.page-content-section .wpcf7-not-valid-tip {
    font-size: 13px;
    color: #d63638;
    margin-top: 6px;
    display: block;
}

.page-content-section .wpcf7-form-control.wpcf7-not-valid {
    border-color: #d63638 !important;
    background-color: #fff5f5 !important;
}

.page-content-section .wpcf7-response-output {
    margin: 24px 0 0;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0;
    border-width: 1px;
}

.page-content-section .wpcf7 form.sent .wpcf7-response-output {
    border-color: #46b450;
    background-color: #f0fff1;
    color: #0b2f5b;
}

.page-content-section .wpcf7 form.invalid .wpcf7-response-output,
.page-content-section .wpcf7 form.unaccepted .wpcf7-response-output,
.page-content-section .wpcf7 form.failed .wpcf7-response-output {
    border-color: #d63638;
    background-color: #fff5f5;
    color: #0b2f5b;
}

.page-content-section .wpcf7-spinner {
    margin-left: 12px;
    vertical-align: middle;
}

/* Hide empty labels / br noise inside labels */
.page-content-section .wpcf7-form label br {
    display: none;
}

.page-content-section .wpcf7-form-control-wrap {
    display: block;
    margin-top: 0;
}
