/* 1. Style the parent Divi Module container to match your firm's layout */
.gel-clio-form-box {
    max-width: 850px !important;
    margin: 30px auto !important; /* Centers the block elegantly on your layout */
    padding: 0 !important;
    background: transparent !important;
    border: none !important; /* Soft border matching institutional style */
}

/* 2. Fallback: Force structural adjustments if it processes as an inner iframe */
.gel-clio-form-box iframe,
.gel-clio-form-box iframe[src*="clio"] {
    width: 100% !important;
    min-height: 750px !important; /* Gives the intake questionnaire plenty of room */
    border: none !important;
    background: transparent !important;
}

/* 3. Real-Time Fields: Universal field handling for raw shortcode outputs */
.gel-clio-form-box form, 
.gel-clio-form-box .clio-grow-form {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
}
.gel-clio-form-box h3 {display:none}

/* Ensure paragraph layout descriptions stay full width */
.gel-clio-form-box p, 
.gel-clio-form-box .form-description,
.gel-clio-form-box .disclaimer {
    flex: 0 0 100% !important;
    font-family: inherit;
    font-size: 13px;
    color: #627d98;
    line-height: 1.6;
}

/* 4. Implement the Two-Column Grid on Desktop */
@media only screen and (min-width: 768px) {
    /* Target individual form group wrappers, paragraph breaks, or list items */
    .gel-clio-form-box .form-group,
    .gel-clio-form-box p:has(input),
    .gel-clio-form-box .field-wrapper {
        flex: 0 0 48% !important; /* Automatically breaks fields into pairs */
        margin-bottom: 20px !important;
    }

    /* Force textareas ("How can we help you?") and submission buttons to remain full width */
    .gel-clio-form-box textarea,
    .gel-clio-form-box .textarea-group,
    .gel-clio-form-box p:has(textarea),
    .gel-clio-form-box button[type="submit"],
    .gel-clio-form-box input[type="submit"] {
        flex: 0 0 100% !important;
    }
}

/* 5. Custom Typography &amp; Input Box Styling */
.gel-clio-form-box label {
    font-weight: 600 !important;
    color: #ffffff !important; /* Deep dark blue brand accent color */
    font-size: 14px !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.gel-clio-form-box input[type="text"],
.gel-clio-form-box input[type="email"],
.gel-clio-form-box input[type="tel"],
.gel-clio-form-box textarea,
.gel-clio-form-box select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #bcccdc !important;
    border-radius: 2px !important;
    background: #f8fafc !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
}

/* Focus States */
.gel-clio-form-box input:focus,
.gel-clio-form-box textarea:focus {
    border-color: #002b5b !important;
    background: #ffffff !important;
    outline: none !important;
}

/* 6. Legal Accent Action Button styling */
.gel-clio-form-box button[type="submit"],
.gel-clio-form-box input[type="submit"] {
    background-color: #4BD6FF !important; /* Aqua blue */
    color: #000000 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 10px 40% !important;
    border: none !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    transition: background 0.2s ease-in-out !important;
    margin-top: 10px !important;
}

.gel-clio-form-box button[type="submit"]:hover,
.gel-clio-form-box input[type="submit"]:hover {
    background-color: #102a43 !important; /* Transitions to midnight slate on hover */
}
/* Force the button background and typography overrides */
html body #page-container .gel-clio-form-box button[type="submit"],
html body #page-container .gel-clio-form-box input[type="submit"],
html body #page-container .gel-clio-form-box .clio-grow-form button,
html body #page-container .gel-clio-form-box .clio-grow-form input[type="submit"] {
    background-color: #002b5b !important; /* Firm deep navy blue */
    background: #4bd6ff !important;       /* Overrides green background gradients */
    color: #000000 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    padding: 16px 35px !important;
    border: none !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 43, 91, 0.15) !important;
    transition: all 0.2s ease-in-out !important;
    -webkit-appearance: none !important; /* Clears hidden mobile device styles */
}

/* Force the deep charcoal/slate transition on hover */
html body #page-container .gel-clio-form-box button[type="submit"]:hover,
html body #page-container .gel-clio-form-box input[type="submit"]:hover,
html body #page-container .gel-clio-form-box .clio-grow-form button:hover,
html body #page-container .gel-clio-form-box .clio-grow-form input[type="submit"]:hover {
    background-color: #102a43 !important;
    background: #102a43 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 43, 91, 0.25) !important;
}
/* Force any paragraph containing a checkbox or disclaimer wrapper to be full width */
html body #page-container .gel-clio-form-box p:has(input[type="checkbox"]),
html body #page-container .gel-clio-form-box .checkbox-group,
html body #page-container .gel-clio-form-box .disclaimer-row,
html body #page-container .gel-clio-form-box div[class*="checkbox"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    clear: both !important;
    margin-bottom: 20px !important;
}

/* Force the submit button to clear the grid columns and start on a brand new line */
html body #page-container .gel-clio-form-box button[type="submit"],
html body #page-container .gel-clio-form-box input[type="submit"],
html body #page-container .gel-clio-form-box .clio-grow-form button {
    flex: 0 0 100% !important;
    width: 100% !important;
    display: block !important;
    clear: both !important;
    margin-top: 25px !important;
}
/* Force the button background and typography overrides */
html body #page-container .gel-clio-form-box button[type="submit"],
html body #page-container .gel-clio-form-box input[type="submit"],
html body #page-container .gel-clio-form-box .clio-grow-form button,
html body #page-container .gel-clio-form-box .clio-grow-form input[type="submit"] {
    background-color: #4bd6ff !important; /* Firm deep navy blue */
    background: #4bd6ff !important;       /* Overrides green background gradients */
    color: #000000 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    padding: 16px 35px !important;
    border: none !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 43, 91, 0.15) !important;
    transition: all 0.2s ease-in-out !important;
    -webkit-appearance: none !important; /* Clears hidden mobile device styles */
}

/* Force the deep charcoal/slate transition on hover */
html body #page-container .gel-clio-form-box button[type="submit"]:hover,
html body #page-container .gel-clio-form-box input[type="submit"]:hover,
html body #page-container .gel-clio-form-box .clio-grow-form button:hover,
html body #page-container .gel-clio-form-box .clio-grow-form input[type="submit"]:hover {
    background-color: #102a43 !important;
    background: #102a43 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 43, 91, 0.25) !important;
}