/**
 * Donation Modal Styles
 */

.hm-donation-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.hm-donation-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.hm-donation-modal {
    width: 66%;
    max-width: 1200px;
    height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: none;
    display: flex;
    /* overflow: hidden;*/
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hm-donation-modal-backdrop.active .hm-donation-modal {
    transform: scale(1);
}

/* Close Button */
.hm-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-size: 24px;
    color: #333;
    line-height: 1;
}

.hm-modal-close:hover {
    transform: scale(1.1);
    background: #f5f5f5;
}

/* Left Section - Hero */
.hm-modal-left {
    width: 40%;
    position: relative;
    /* overflow: hidden;*/
    border-radius: 20px !important;
}

.hm-modal-hero {
    height: 100%;
    width: 100%;
    position: relative;
}

.hm-modal-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hm-modal-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hm-modal-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    color: white;
}

.hm-modal-hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hm-modal-hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Right Section - Form */
.hm-modal-right {
    width: 60%;
    overflow-y: auto;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 0px 20px 20px 0px !important;
    /* overflow: hidden;*/
}

/* Responsive */
@media (max-width: 992px) {
    .hm-donation-modal {
        width: 90%;
        flex-direction: column;
        height: 90vh;
    }

    .hm-modal-left {
        width: 100%;
        height: 200px;
        flex-shrink: 0;
    }

    .hm-modal-right {
        width: 100%;
        height: auto;
        flex-grow: 1;
    }
}

@media (max-width: 768px) {
    .hm-donation-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Close Intent Popup */
.hm-close-intent-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2147483647;
    width: 90%;
    max-width: 500px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.hm-close-intent-popup * {
    pointer-events: auto !important;
}

.hm-close-intent-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.hm-close-intent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483646;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hm-close-intent-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Hero Type Layout */
.hm-modal-hero.type-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 20px !important;
}

.hm-modal-hero.type-modal .hm-modal-hero-image {
    height: 50%;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 20px 0px 0px;
}


.hm-modal-hero.type-modal .hm-modal-hero-content-wrapper {
    height: 50%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    color: #333;
}

.hm-modal-hero.type-modal .hm-modal-hero-logo {
    margin-bottom: 20px;
}

.hm-modal-hero.type-modal .hm-modal-hero-logo img {
    height: 40px;
    width: auto;
}

.hm-modal-hero.type-modal .hm-modal-hero-title {
    font-size: 20px;
    font-weight: 900;
    color: #333;
    margin-bottom: 15px;
    text-shadow: none;
    line-height: 1.3;
}

.hm-modal-hero.type-modal .hm-modal-hero-body {
    font-size: 12px;
    font-weight: 700;
    /* Bold */
    color: #333;
    line-height: 1.5;
}

.hm-modal-hero.type-modal .hm-modal-hero-body p {
    margin-bottom: 10px;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {

    /* Full screen modal on mobile */
    .hm-donation-modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        /* Changed from 100vh to avoid viewport issues */
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    /* Hide hero section on mobile */
    .hm-modal-left {
        display: none !important;
    }

    /* Form takes full width */
    .hm-modal-right {
        width: 100% !important;
        height: 100% !important;
        /* Ensure it takes full height to allow scroll */
        padding: 20px 20px 120px 20px !important;
        /* Extra bottom padding for buttons */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
    }

    /* Reduce form container padding */
    .hm-donation-form-container {
        padding: 20px !important;
        margin-top: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Compact close button */
    .hm-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    /* Reduce modal content padding */
    .hm-modal-content {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {

    /* Extra small screens - even more compact */
    .hm-modal-right {
        padding: 15px !important;
    }

    .hm-donation-form-container {
        padding: 15px !important;
    }

    .hm-modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    /* Prevent horizontal scroll and bad breaks */
    .hm-donation-modal,
    .hm-modal-right,
    .hm-donation-form-container {
        box-sizing: border-box;
        max-width: 100vw;
        overflow-x: hidden;
    }
}