/**
 * Bricks Custom Element: Gated Download
 * Scoped to ensure no style leakage
 */

.brx-gated-download {
    padding: 60px 0; /* Reduced mobile padding */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: "Figtree", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent background leakage */
}

.gform_confirmation_message{
    font-size:1em !important;
}

.gform_confirmation_message a{
    text-decoration:underline !important;
}

.gform_confirmation_message a:hover{
    text-decoration:none !important;
}

.brx-gated-download .gd-container {
   max-width: 1440px; /* Matches the original contact-element-container */
    width: 100%; /* Allows it to reach the max-width on desktop */
    margin-left: 20px;
    margin-right: 20px;
    margin-top:70px;
    margin-bottom:50px;
    background: #ffffff;
    border-radius: 25px;
    padding: 60px 80px; /* Matches original desktop padding */
    box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.3); /* Matches original shadow */
    box-sizing: border-box;
}

.brx-gated-download .gd-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* Fix: Remove fixed min-widths on mobile to stop horizontal scrolling */
.brx-gated-download .gd-col-left,
.brx-gated-download .gd-col-right {
    flex: 1 1 100%; /* Stack by default */
    min-width: 0; /* Reset min-width for mobile */
    box-sizing: border-box;
}

/* Left Column Styling */
.brx-gated-download .gd-preview-image img,
.brx-gated-download .gd-featured-image img {
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    display: block;
}

.brx-gated-download .gd-wysiwyg-content {
    color: #36194c;
    word-wrap: break-word; /* Fix for long titles */
}

.brx-gated-download .gd-small-title {
    display: block;
    color: #94268f;
    font-weight: 500;
    text-transform: capitalize;
    font-size: 1.1em;
    margin-bottom: 10px;
    margin-top: 10px;
}

.brx-gated-download .gd-main-title {
    font-size: 1.8em; /* Responsive default */
    color: #36194c;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 500;
}

.brx-gated-download .gd-content {
    font-size: 1.1em;
    line-height: 1.6;
    color: #36194c;
}

/* Right Column Form Styling */
.brx-gated-download .gd-form-heading {
    font-size: 2em;
    color: #36194c;
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Gravity Forms Overrides - Added width safety */
.brx-gated-download .gform_wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

.brx-gated-download .gform_wrapper input:not([type="submit"]):not([type="checkbox"]),
.brx-gated-download .gform_wrapper textarea {
    width: 100% !important; /* Force input to fit */
    background-color: #f3f3f3 !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    font-family: "Figtree", sans-serif !important;
    color: #36194c !important;
    box-sizing: border-box !important;
}

.brx-gated-download .gform_button {
    background-color: #94268f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 35px !important;
    font-size: 18px !important;
    cursor: pointer;
    width: auto;
    max-width: 100%;
}

/* DESKTOP STYLES (1024px+) */
@media (min-width: 1024px) {
   .brx-gated-download .gd-container {
        margin-left:20px;
        margin-right:20px;
        padding: 40px;
    }

    .brx-content{
        padding-left:20px !important;
        padding-right:20px !important;
    }
    
    .brx-gated-download .gd-container {
        padding: 60px 80px;
    }

    .brx-gated-download .gd-columns {
        flex-direction: row;
        gap: 60px;
    }

    .brx-gated-download .gd-col-left {
        flex: 1;
        min-width: 350px;
    }

    .brx-gated-download .gd-col-right {
        flex: 1.2;
        min-width: 350px;
    }

    .brx-gated-download .gd-main-title {
        font-size: 2.2em;
    }

    .brx-gated-download .gd-form-heading {
        font-size: 2.5em;
    }
}

@media (max-width: 767px) {
    .brx-gated-download .gd-container {
        margin-top: 0px;
        padding: 30px 20px;
        border-radius: 15px;
        margin-left:20px;
        margin-right:20px;
    }

    .brx-gated-download .gd-main-title{
        font-size:1.5em;
    }

    .gd-form-heading{
        font-size:1.5em !important;
    }

    .brx-gated-download .gd-container {
        margin-top:50px;
    }
}