.fp-commercial-contact-form .fp-commercial-label {
    display: block;
    margin: 0 0 6px;
    color: #303030;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.fp-commercial-contact-form .fp-commercial-compliance {
    clear: both;
    width: 100%;
    margin: 18px 0;
    color: #303030;
    font-size: 13px;
    line-height: 1.5;
}

.fp-commercial-contact-form .fp-commercial-required-note {
    margin: 0 0 12px;
    font-weight: 600;
}

.fp-commercial-contact-form .fpcc-privacy-notice {
    margin: 0 0 14px;
    color: #555;
}

.fp-commercial-contact-form .fpcc-privacy-notice a {
    color: #091B2C;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fp-commercial-contact-form .fp-commercial-consent {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.fp-commercial-contact-form .fp-commercial-consents {
    box-sizing: border-box;
    clear: both;
    width: 100%;
    margin: 14px 0 22px;
    padding: 20px 22px;
    border: 1px solid rgba(184, 144, 88, 0.38);
    border-left: 4px solid #091B2C;
    border-radius: 6px;
    background: #ffffff;
    color: #303030;
    box-shadow: 0 8px 24px rgba(9, 27, 44, 0.05);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.fp-commercial-contact-form .fp-commercial-consent-title {
    margin: 0 0 14px;
    color: #091B2C;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.fp-commercial-contact-form .fpcc-phone-consent-information {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 5px;
    background: #f7f7f5;
    color: #303030;
    font-size: 13px;
    line-height: 1.55;
}

.fp-commercial-contact-form .fpcc-phone-consent-information p {
    margin: 0 0 8px;
}

.fp-commercial-contact-form .fpcc-phone-consent-information p:last-child {
    margin-bottom: 0;
}

.fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"] {
    position: relative;
    box-sizing: border-box;
    width: 26px;
    min-width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #091B2C;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 8px;
    width: 6px;
    height: 11px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    opacity: 0;
    transform: rotate(45deg) scale(0.7);
    transform-origin: center;
    transition: opacity 120ms ease, transform 120ms ease;
}

.fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"]:checked {
    border-color: #091B2C;
    background: #091B2C;
}

.fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.fp-commercial-contact-form .fp-commercial-consent label {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 2px 0;
    color: #303030;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    cursor: pointer;
}

.fp-commercial-contact-form input:focus-visible,
.fp-commercial-contact-form textarea:focus-visible,
.fp-commercial-contact-form .fp-commercial-consent input:focus-visible {
    outline: 3px solid #588890;
    outline-offset: 3px;
}

.fp-commercial-contact-form .fp-commercial-consents.fpcc-consent-invalid {
    border-color: #d9a09a;
    border-left-color: #a94a43;
    background: #fffafa;
    box-shadow: 0 8px 24px rgba(122, 31, 26, 0.06);
}

.fp-commercial-contact-form .fpcc-consent-error {
    margin: 12px 0 0 44px;
    color: #7a1f1a;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}

.fp-commercial-contact-form .fpcc-consent-error[hidden] {
    display: none;
}

.fp-commercial-contact-form .alert-message.wpestate-agent-contact-sent,
.fp-commercial-contact-form .elementor-message-success,
.fp-commercial-contact-form .alert-success {
    box-sizing: border-box;
    padding: 11px 14px !important;
    border: 1px solid rgba(184, 144, 88, 0.55) !important;
    border-radius: 6px !important;
    background: #f7f7f5 !important;
    color: #091B2C !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 5px 18px rgba(9, 27, 44, 0.05);
}

.fp-commercial-contact-form .alert-message.wpestate-agent-contact-sent::before,
.fp-commercial-contact-form .elementor-message-success::before,
.fp-commercial-contact-form .alert-success::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 1px solid rgba(184, 144, 88, 0.7);
    border-radius: 50%;
    color: #091B2C;
    font-size: 12px;
    line-height: 1;
    vertical-align: -2px;
}

body.fpcc-success-dialog-open .fp-commercial-contact-form .alert-message.wpestate-agent-contact-sent,
body.fpcc-success-dialog-open .fp-commercial-contact-form .elementor-message-success,
body.fpcc-success-dialog-open .fp-commercial-contact-form .alert-success {
    display: none !important;
}

.fp-commercial-contact-form .alert-message:not(.wpestate-agent-contact-sent):not(:empty),
.fp-commercial-contact-form .elementor-message-danger,
.fp-commercial-contact-form .elementor-message-error,
.fp-commercial-contact-form .alert-danger,
.fp-commercial-contact-form .alert-error {
    box-sizing: border-box;
    padding: 11px 14px !important;
    border: 1px solid #d9a09a !important;
    border-radius: 6px !important;
    background: #fff7f6 !important;
    color: #7a1f1a !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes fpcc-consent-attention-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(184, 144, 88, 0);
    }
    50% {
        box-shadow: 0 10px 30px rgba(9, 27, 44, 0.12), 0 0 0 4px rgba(184, 144, 88, 0.14);
    }
}

.fp-commercial-contact-form .fp-commercial-consents.fpcc-consent-attention:not(.fpcc-consent-invalid) {
    animation: fpcc-consent-attention-pulse 1.6s ease-in-out 1;
}

body.single-estate_agent .realtor-contact-buttons .send_email_agent[href="#agent_send_email"] {
    display: none !important;
}

body.single-estate_agent #agent_send_email .agent_submit_class {
    text-transform: none;
}

body.single-estate_property #wpestate_single_agent_details_wrapper .contact_form_flex_wrapper {
    flex-wrap: wrap;
    align-items: stretch;
}

/*
 * Fiche bien : WPResidence place les libellés et les champs dans le même
 * conteneur flex. Avec le bloc de consentement ajouté, les éléments peuvent
 * être comprimés sur une seule ligne. On force ici une présentation verticale
 * lisible et stable, sans modifier la logique fonctionnelle du formulaire.
 */
body.single-estate_property #wpestate_single_agent_details_wrapper .contact_form_flex_input_wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
    width: 100%;
    min-width: 0;
}

body.single-estate_property #wpestate_single_agent_details_wrapper
    .contact_form_flex_input_wrapper > .fp-commercial-label {
    margin: 0;
    white-space: normal;
}

body.single-estate_property #wpestate_single_agent_details_wrapper
    .contact_form_flex_input_wrapper
    > :is(
        label[for="agent_contact_name"],
        #agent_contact_name,
        label[for="agent_user_email"],
        #agent_user_email,
        label[for="agent_phone"],
        #agent_phone
    ) {
    box-sizing: border-box;
    grid-column: 1;
    width: 100%;
    min-width: 0;
}

body.single-estate_property #wpestate_single_agent_details_wrapper
    .contact_form_flex_input_wrapper
    > :is(label[for="agent_user_email"], label[for="agent_phone"]) {
    margin-top: 8px;
}

body.single-estate_property #wpestate_single_agent_details_wrapper .contact_form_flex_wrapper
    > :is(.fp-commercial-consents, label[for="agent_comment"], #agent_comment, .fp-commercial-compliance) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    flex: 0 0 100%;
}

body.single-estate_property #wpestate_single_agent_details_wrapper .contact_form_flex_wrapper
    > .fp-commercial-consents {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    flex: 0 0 100%;
}

body.single-estate_agent #agent_send_email .contact_form_flex_wrapper {
    align-items: stretch;
}

body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 6px;
    width: 100%;
    min-width: 0;
}

body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper > .fp-commercial-label {
    margin: 0;
    white-space: nowrap;
}

body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper
    > :is(label[for="agent_contact_name"], #agent_contact_name) {
    grid-column: 1;
}

body.single-estate_agent #agent_send_email label[for="agent_contact_name"] {
    grid-row: 1;
}

body.single-estate_agent #agent_send_email #agent_contact_name {
    grid-row: 2;
}

body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper
    > :is(label[for="agent_user_email"], #agent_user_email) {
    grid-column: 1;
}

body.single-estate_agent #agent_send_email label[for="agent_user_email"] {
    grid-row: 3;
    margin-top: 8px;
}

body.single-estate_agent #agent_send_email #agent_user_email {
    grid-row: 4;
}

body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper
    > :is(label[for="agent_phone"], #agent_phone) {
    grid-column: 1;
}

body.single-estate_agent #agent_send_email label[for="agent_phone"] {
    grid-row: 5;
    margin-top: 8px;
}

body.single-estate_agent #agent_send_email #agent_phone {
    grid-row: 6;
}

body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper > input.form-control,
body.single-estate_agent #agent_send_email .contact_form_flex_wrapper
    > :is(.fp-commercial-consents, label[for="agent_comment"], #agent_comment, .fp-commercial-compliance) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    flex: 0 0 100%;
}

@media (max-width: 991px) {
    body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper
        > :is(
            label[for="agent_contact_name"],
            #agent_contact_name,
            label[for="agent_user_email"],
            #agent_user_email,
            label[for="agent_phone"],
            #agent_phone
        ) {
        grid-column: 1;
        grid-row: auto;
    }

    body.single-estate_agent #agent_send_email .contact_form_flex_input_wrapper
        > :is(label[for="agent_user_email"], label[for="agent_phone"]) {
        margin-top: 8px;
    }
}

body.fpcc-success-dialog-open {
    overflow: hidden;
}

.fpcc-success-dialog-backdrop {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    background: rgba(9, 27, 44, 0.46);
    overscroll-behavior: contain;
}

.fpcc-success-dialog {
    box-sizing: border-box;
    width: min(100%, 520px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 40px 38px 34px;
    border: 1px solid rgba(184, 144, 88, 0.55);
    border-radius: 10px;
    background: #f7f7f5;
    box-shadow: 0 18px 50px rgba(9, 27, 44, 0.28);
    color: #091B2C;
    text-align: center;
}

.fpcc-success-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 50%;
    border: 1px solid #b89058;
    background: #ffffff;
    color: #091B2C;
    font-size: 27px;
    font-weight: 600;
    line-height: 1;
}

.fpcc-success-dialog h2 {
    margin: 0 0 14px;
    color: #091B2C;
    font-size: clamp(23px, 4vw, 30px);
    font-weight: 600;
    line-height: 1.25;
}

.fpcc-success-dialog p {
    margin: 0 auto 28px;
    max-width: 410px;
    color: #303030;
    font-size: 17px;
    line-height: 1.55;
}

.fpcc-success-dialog-close {
    min-width: 140px;
    min-height: 46px;
    padding: 11px 24px;
    border: 1px solid #b89058;
    border-radius: 4px;
    background: #b89058;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.fpcc-success-dialog-close:hover {
    border-color: #091B2C;
    background: #091B2C;
    color: #ffffff;
}

.fpcc-success-dialog-close:focus-visible {
    outline: 3px solid #b89058;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .fp-commercial-contact-form .fp-commercial-compliance {
        margin: 16px 0;
        font-size: 12.5px;
    }

    .fp-commercial-contact-form .fp-commercial-consent {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 12px;
    }

    .fp-commercial-contact-form .fp-commercial-consents {
        margin: 12px 0 20px;
        padding: 17px 16px;
    }

    .fp-commercial-contact-form .fp-commercial-consent-title {
        font-size: 15px;
    }

    .fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"] {
        width: 26px;
        height: 26px;
    }

    .fp-commercial-contact-form .fp-commercial-consent label {
        font-size: 14px;
    }

    .fp-commercial-contact-form .fpcc-consent-error {
        margin-left: 0;
    }

    .fpcc-success-dialog-backdrop {
        padding: 16px;
    }

    .fpcc-success-dialog {
        width: 100%;
        max-height: calc(100vh - 32px);
        padding: 30px 22px 26px;
    }

    .fpcc-success-dialog p {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fp-commercial-contact-form .fp-commercial-consents,
    .fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"],
    .fp-commercial-contact-form .fp-commercial-consent input[type="checkbox"]::after {
        transition: none;
    }

    .fp-commercial-contact-form .fp-commercial-consents.fpcc-consent-attention {
        animation: none;
    }
}
