/* =============================================
   Brochure Download - Gated  |  Frontend Styles
   ============================================= */

/* ── Download Button ── */
button.bdg-download-btn,
button.bdg-download-btn.bdg-download-btn,
.bdg-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 32px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #3CC8F0 !important;
    border: 2px solid #3CC8F0 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    text-decoration: none !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    outline: none !important;
}

button.bdg-download-btn:hover,
button.bdg-download-btn.bdg-download-btn:hover,
.bdg-download-btn:hover {
    background: #3CC8F0 !important;
    background-color: #3CC8F0 !important;
    color: #ffffff !important;
    border-color: #3CC8F0 !important;
    box-shadow: 0 4px 14px rgba(60, 200, 240, 0.35) !important;
}

button.bdg-download-btn:hover .bdg-btn-icon svg,
.bdg-download-btn:hover .bdg-btn-icon svg {
    stroke: #ffffff;
}

button.bdg-download-btn:active,
.bdg-download-btn:active {
    box-shadow: 0 2px 6px rgba(60, 200, 240, 0.25) !important;
}

.bdg-btn-icon {
    display: inline-flex;
    align-items: center;
}

.bdg-btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: #3CC8F0;
    stroke-width: 2.2;
    fill: none;
    transition: stroke 0.25s;
}

/* ── Overlay ── */
.bdg-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.bdg-overlay.bdg-active {
    opacity: 1;
    visibility: visible;
}

/* ── Modal ── */
.bdg-modal {
    position: relative;
    width: 90%;
    max-width: 460px;
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.3s ease;
}

.bdg-overlay.bdg-active .bdg-modal {
    transform: translateY(0) scale(1);
}

/* ── Close button ── */
.bdg-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.bdg-close:hover {
    color: #333;
}

/* ── Heading & subtext ── */
.bdg-modal h2 {
    margin: 0 0 8px;
    font-size: 32px !important;
    font-weight: 700;
    line-height: 1.25;
    color: #222;
}

.bdg-modal .bdg-subtext {
    margin: 0 0 24px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ── Form fields ── */
.bdg-form-group {
    margin-bottom: 16px;
}

.bdg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.bdg-form-group label .bdg-required {
    color: #e74c3c;
    margin-left: 2px;
}

.bdg-form-group input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.bdg-form-group input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

.bdg-form-group input.bdg-input-error {
    border-color: #e74c3c;
}

/* ── reCAPTCHA ── */
.bdg-recaptcha-wrapper {
    margin-bottom: 16px;
}

/* ── Submit button ── */
.bdg-submit-btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
}

.bdg-submit-btn:hover {
    opacity: 0.9;
}

.bdg-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Spinner ── */
.bdg-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bdg-spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes bdg-spin {
    to { transform: rotate(360deg); }
}

.bdg-submit-btn.bdg-loading .bdg-submit-text {
    display: none;
}

.bdg-submit-btn.bdg-loading .bdg-spinner {
    display: inline-block;
}

/* ── Error / success messages ── */
.bdg-message {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.bdg-message.bdg-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    display: block;
}

.bdg-message.bdg-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    display: block;
}

/* ── Success state ── */
.bdg-success-state {
    text-align: center;
    padding: 20px 0;
}

.bdg-success-state .bdg-checkmark {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 12px;
}

.bdg-success-state h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #15803d;
}

.bdg-success-state p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ── Privacy note ── */
.bdg-privacy {
    margin-top: 14px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

.bdg-privacy a {
    color: #666;
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .bdg-modal {
        padding: 28px 20px 22px;
    }

    .bdg-modal h2 {
        font-size: 24px !important;
        line-height: 1.3;
    }
}
