/* ==========================================================================
   Cosychats Theme - Contact Form 7 (CF7) Custom Styles
   Scoped strictly under .wpcf7 to prevent style leakage across other pages.
   ========================================================================== */

.wpcf7 {
    width: 100%;
    margin: 24px auto 40px;
}

.wpcf7 .container {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(164, 67, 144, 0.14);
    border-radius: 24px;
    padding: 38px 36px 32px;
    box-shadow: 0 14px 40px rgba(109, 46, 103, 0.08);
    box-sizing: border-box;
}

.wpcf7 .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.wpcf7 .col-md-6,
.wpcf7 .col-md-12 {
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 18px;
}

.wpcf7 .col-md-6 {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
}

.wpcf7 .col-md-12 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

/* Neutralize WordPress / CF7 auto-paragraph spacing inside grid columns */
.wpcf7 .col-md-6 p,
.wpcf7 .col-md-12 p {
    margin: 0;
}

.wpcf7 .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Inputs, Select & Textarea */
.wpcf7 .form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--cosy-font-body, 'Poppins', sans-serif);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--cosy-text-dark, #221221);
    background-color: var(--cosy-bg-light, #fdf5fc);
    border: 1.5px solid rgba(164, 67, 144, 0.18);
    border-radius: 14px;
    padding: 13px 16px;
    outline: none;
    transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.wpcf7 .form-control::placeholder {
    color: var(--cosy-text-muted, #6b5569);
    opacity: 0.72;
}

.wpcf7 .form-control:hover {
    border-color: rgba(164, 67, 144, 0.36);
}

.wpcf7 .form-control:focus {
    background-color: #ffffff;
    border-color: var(--cosy-accent, #a44390);
    box-shadow: 0 6px 20px rgba(164, 67, 144, 0.12), 0 0 0 3px rgba(164, 67, 144, 0.14);
}

/* Custom Dropdown Arrow for Select Field */
.wpcf7 select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d2e67' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 15px 15px;
}

/* Textarea Sizing */
.wpcf7 textarea.form-control {
    min-height: 145px;
    resize: vertical;
}

/* Submit Button & Spinner Row */
.wpcf7 .col-md-12:last-child {
    margin-bottom: 0;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wpcf7 .col-md-12:last-child p {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpcf7 .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 14px 36px;
    font-family: var(--cosy-font-heading, 'Outfit', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(135deg, #a44390 0%, #6d2e67 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(164, 67, 144, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.wpcf7 .submit-btn:hover {
    background: linear-gradient(135deg, #8c327b 0%, #581e53 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(109, 46, 103, 0.38);
}

.wpcf7 .submit-btn:active {
    transform: translateY(0);
}

.wpcf7 .wpcf7-spinner {
    margin: 0;
    width: 0;
    overflow: hidden;
    background-color: var(--cosy-accent, #a44390);
    transition: width 0.2s ease, margin 0.2s ease;
}

.wpcf7 form.submitting .wpcf7-spinner {
    width: 24px;
    margin-left: 12px;
}

/* Field Validation Errors */
.wpcf7 .form-control.wpcf7-not-valid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.wpcf7 .wpcf7-not-valid-tip {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #dc2626;
    margin-top: 6px;
    padding-left: 4px;
}

/* Submission Response Messages */
.wpcf7 form .wpcf7-response-output {
    margin: 22px 0 0;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 500;
    border-width: 1.5px;
    border-style: solid;
}

.wpcf7 form.sent .wpcf7-response-output {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 767px) {
    .wpcf7 .container {
        padding: 26px 20px 24px;
        border-radius: 18px;
    }

    .wpcf7 .col-md-6 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .wpcf7 .submit-btn {
        width: 100%;
    }
}

