.lead-form-btn{
    display: flex;
    justify-content: center;
    margin: 16px 0 !important;

    .btn-open-form-modal {
        padding: 14px 26px;
        background-color: #FC6923;
        color: #fff;
        border: none;
        border-radius: 50px;
        cursor: pointer;
        font-weight: 400;
        font-size: 1.125rem;
        transition: background-color 0.3s ease;
        margin: 0 auto;
        width: calc(75% - var(--wp--style--block-gap, .5em) * .25);
        max-width: 450px;
        line-height: 1.5;
    }
}

.btn-open-form-modal:hover {
    background-color: #e55a1b;
}

/* Custom Modal Styles */
.lead-form-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: -1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, z-index 0s 0.3s;
    margin: 0 !important;
    padding: 50px 20px !important;
}

.lead-form-modal.active {
    opacity: 1;
    z-index: 9999;
    pointer-events: auto;
    transition: opacity 0.3s ease, z-index 0s 0s;
}

.lead-form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.lead-form-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    z-index: 10000;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.lead-form-modal-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.lead-form-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FC6923;
    color: #fff;
    flex-shrink: 0;
}

.lead-form-modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
}

.lead-form-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lead-form-modal-close:hover {
    opacity: 0.8;
}

.lead-form-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* CF7 Form Styles */
.lead-form-modal-body .wpcf7-form {
    display: block;
}

/* Form Row - 2 column layout */
.lead-form-modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* Special row for roles with aligned tops */
.lead-form-modal-body .form-row-roles {
    align-items: flex-start;
    margin-bottom: 0;
}

.lead-form-modal-body .form-col {
    display: flex;
    flex-direction: column;
}

.lead-form-modal-body .form-col-full {
    grid-column: 1 / -1;
}

/* Form sections for radio groups */
.lead-form-modal-body .form-section {
    /*margin-bottom: 20px;*/
}

/* Text inputs, email, textarea */
.lead-form-modal-body .wpcf7-form-control.wpcf7-text,
.lead-form-modal-body .wpcf7-form-control.wpcf7-email,
.lead-form-modal-body .wpcf7-form-control.wpcf7-textarea,
.lead-form-modal-body .wpcf7-form-control.wpcf7-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.lead-form-modal-body .wpcf7-form-control.wpcf7-text:focus,
.lead-form-modal-body .wpcf7-form-control.wpcf7-email:focus,
.lead-form-modal-body .wpcf7-form-control.wpcf7-textarea:focus,
.lead-form-modal-body .wpcf7-form-control.wpcf7-select:focus {
    border-color: #FC6923;
    outline: none;
}

.lead-form-modal-body .submit-button-container p{
    display: flex;
    justify-content: center;

    .wpcf7-form-control.wpcf7-submit {
        background-color: #FC6923;
        color: #fff;
        border: none;
        padding: 14px 26px;
        cursor: pointer;
        font-weight: 400;
        font-size: 1.125rem;
        transition: background-color 0.3s;
        width: 100%;
        max-width: 450px;
        margin: 10px auto 0;
        border-radius: 50px;
    }

}

.lead-form-modal-body .wpcf7-form-control.wpcf7-submit:hover {
    background-color: #e55a1b;
}

/* Labels */
.lead-form-modal-body label {
    display: block;
    margin-bottom: 0 !important;
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

.lead-form-modal-body .form-col > label {
    margin-bottom: 5px !important;
}

/* Radio buttons */
.lead-form-modal-body .wpcf7-radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.lead-form-modal-body .wpcf7-list-item {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0;
}

.lead-form-modal-body .wpcf7-list-item label {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    cursor: pointer;
    font-weight: 400;
    color: #333;
    font-size: 14px;
}

.lead-form-modal-body .wpcf7-list-item-label {
    margin-bottom: 0 !important;
}

.lead-form-modal-body .wpcf7-list-item input[type="radio"] {
    margin-right: 8px;
    margin-bottom: 0 !important;
    cursor: pointer;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
}

.lead-form-modal-body .wpcf7-list-item input[type="radio"]:hover {
    border-color: #FC6923;
}

.lead-form-modal-body .wpcf7-list-item input[type="radio"]:checked {
    border-color: #FC6923;
    background-color: #FC6923;
}

.lead-form-modal-body .wpcf7-list-item input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
}

/* Form sections */
.lead-form-modal-body hr {
    border: none;
    border-top: 1px solid #717171;
    margin: 20px 0;
}

.lead-form-modal-body strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.lead-form-modal-body span {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-style: normal;
}

/* Conditional groups */
.lead-form-modal-body .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Hide line breaks */
.lead-form-modal-body br {
    display: none;
}

/* Form note at bottom */
.lead-form-modal-body .form-note {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    line-height: 1.5;
}

/* Response messages */
.lead-form-modal-body .wpcf7-response-output {
    margin: 20px 0 0 !important;
    padding: 12px !important;
    border-radius: 4px;
    font-size: 14px;
}

.lead-form-modal-body .wpcf7-validation-errors {
    border: 2px solid #dc3232;
    background-color: #f8d7da;
    color: #721c24;
}

.lead-form-modal-body .wpcf7-mail-sent-ok {
    border: 2px solid #46b450;
    background-color: #d4edda;
    color: #155724;
}

.lead-form-modal-body .wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 11px;
    margin-top: 3px;
    display: block;
}

/* Spinner */
.lead-form-modal-body .wpcf7-spinner {
    position: absolute;
    right: 30px;
    bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .lead-form-modal {
        padding: 20px 16px !important;
    }

    .lead-form-modal-dialog {
        max-width: 100%;
    }

    .lead-form-modal-body {
        padding: 20px;
    }

    .lead-form-modal-body .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
