/**
 * UHY Gated Download - Minimal Lightbox Styles
 */

/* Button Styles - Inherits from Elementor */
.uhy-gated-download-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.uhy-gated-download-trigger .elementor-button-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.uhy-gated-download-trigger .elementor-button-icon {
    flex-shrink: 0;
}

/* Popup Base Styles */
.uhy-gated-download-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.uhy-gated-download-popup.uhy-popup-active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.uhy-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFFD9;
    z-index: 1;
}

/* Popup Container */
.uhy-popup-container {
    position: relative;
    max-width: 640px;
    width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 1.5em 1.5em 1.5em 1.5em;
    box-shadow: 2px 8px 23px 3px rgba(0,0,0,0.2);
    z-index: 2;
    overflow: hidden;
}

/* Close Button */
.uhy-popup-close {
    font-size: 2rem !important;
    font-weight: 500 !important;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none !important;
    border: none;
    border-radius: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    line-height: 1 !important;
    color: #555 !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.uhy-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Popup Content */
.uhy-popup-content {
    padding: 3rem;
    max-height: 90vh;
    overflow-y: auto;
}

/* Title & Description */
.uhy-popup-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    text-align: center;
}

.uhy-popup-description {
    margin: 0 0 24px;
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

/* Form Container */
.uhy-form-container {
    margin: 24px 0;
}

/* Form Field Styling */
.uhy-form-container input,
.uhy-form-container textarea,
.uhy-form-container select {
    border-radius: 10px !important;
    border-color: var(--e-global-color-primary) !important;
}

.uhy-form-container input[type="submit"],
.uhy-form-container button[type="submit"] {
    background-color: var(--e-global-color-accent) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 15px 30px !important;
    font-family: var(--e-global-typography-e69aec7-font-family), Sans-serif !important;
    font-size: 1rem !important;
    font-weight: bold;
}

.uhy-form-container input[type="submit"]:hover,
.uhy-form-container button[type="submit"]:hover {
    background-color: var(--e-global-color-primary) !important;
    color: #ffffff !important;
}

/* Gravity Forms Styling */
.uhy-form-container .gform_wrapper {
    margin: 0;
}

.uhy-form-container .gform_wrapper .gform_footer {
    padding: 0;
    margin: 16px 0 0;
}

.uhy-form-container .gform_wrapper .gform_button {
    width: 100%;
}

/* Mailchimp Styling */
.uhy-form-container #mc_embed_signup {
    margin: 0;
}

.uhy-form-container #mc_embed_signup .mc-field-group {
    margin-bottom: 16px;
}

.uhy-form-container #mc_embed_signup input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.uhy-form-container #mc_embed_signup .button {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Success Message */
.uhy-success-message {
    padding: 24px 0;
    text-align: center;
}

.uhy-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.uhy-success-message p {
    margin: 0 0 20px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.uhy-success-message .uhy-download-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 15px;
    text-decoration: none;
}

.uhy-success-message .elementor-button-content-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 767px) {
    .uhy-popup-container {
        width: 95%;
        max-height: 95vh;
    }

    .uhy-popup-content {
        padding: 36px 24px 24px;
    }

    .uhy-popup-title {
        font-size: 20px;
    }

    .uhy-popup-description {
        font-size: 14px;
    }

    .uhy-popup-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}
