/**
 * Home Promotion Pop-up Stylesheet (Mockup Matching)
 * Custom styles for responsive 2-column Bootstrap-styled donation popup
 */

.home-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    backdrop-filter: blur(4px);
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 15px;
}

.home-popup-overlay.show {
    display: flex;
    opacity: 1;
}

.home-popup-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 820px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    min-height: 480px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.home-popup-overlay.show .home-popup-container {
    transform: scale(1);
}

/* Close Button */
.home-popup-close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    line-height: 1;
    z-index: 10002;
    transition: color 0.2s, transform 0.2s;
    outline: none;
}

.home-popup-close-btn:hover {
    color: #da542e;
    transform: rotate(90deg);
}

/* Loading Preloader inside Pop-up */
.home-popup-preloader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 10010;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-popup-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Left Column: Image */
.home-popup-image-col {
    width: 48%;
    background-color: #f7f7f7;
    position: relative;
    overflow: hidden;
    display: block;
}

.home-popup-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right Column: Form */
.home-popup-form-col {
    width: 52%;
    padding: 30px 25px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
}

.home-popup-form-inner {
    width: 100%;
}

/* Labels and Headers */
.home-popup-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    display: block;
}

/* Form Controls */
.home-popup-input-bootstrap,
.home-popup-select-bootstrap,
.home-popup-textarea-bootstrap {
    font-size: 13px !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
    border: 1px solid #ced4da !important;
    background-color: #ffffff !important;
    color: #495057 !important;
    outline: none !important;
    width: 100%;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.home-popup-input-bootstrap:focus,
.home-popup-select-bootstrap:focus,
.home-popup-textarea-bootstrap:focus {
    border-color: #008a55 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 138, 85, 0.15) !important;
}



.home-popup-textarea-bootstrap {
    resize: none;
}

/* Mini Amount Presets */
.home-popup-mini-presets {
    display: flex;
    gap: 5px;
}

.home-popup-preset-btn {
    font-size: 11px !important;
    padding: 4px 10px !important;
    font-weight: 600 !important;
    border-color: #ced4da !important;
    color: #495057 !important;
    background: #ffffff !important;
}

.home-popup-preset-btn:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.home-popup-preset-btn.active {
    background-color: #008a55 !important;
    border-color: #008a55 !important;
    color: #ffffff !important;
}

/* Total Card & Button */
.home-popup-total-card {
    background-color: #f8f9fa;
    border: 1px solid #eef0f2;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-popup-btn-emerald {
    background-color: #008a55 !important;
    border-color: #008a55 !important;
    font-size: 13.5px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 6px rgba(0, 138, 85, 0.15);
    transition: background-color 0.2s, transform 0.1s;
}

.home-popup-btn-emerald:hover {
    background-color: #007346 !important;
    border-color: #007346 !important;
}

.home-popup-btn-emerald:active {
    transform: scale(0.97);
}

/* Mobile & Tablet Responsive Layout */
@media (max-width: 768px) {
    .home-popup-container {
        max-width: 440px;
        min-height: auto;
    }
    
    .home-popup-wrapper {
        flex-direction: column;
    }
    
    .home-popup-image-col {
        width: 100%;
        height: 180px;
    }
    
    .home-popup-form-col {
        width: 100%;
        padding: 25px 20px;
    }

    .home-popup-input-bootstrap,
    .home-popup-select-bootstrap,
    .home-popup-textarea-bootstrap {
        font-size: 16px !important; /* Prevents auto-zoom on mobile focus */
    }
}

@media (max-width: 480px) {
    .home-popup-image-col {
        display: none;
    }
}
