/* =========================================
   HOMEPAGE PRICING OVERLAY (Aggressive Mobile Fix)
   File: assets/css/bali-home-pricing.css
   ========================================= */

.bali-pricing-interactive-wrap {
    position: relative; 
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- TRIGGER LAYOUT --- */
.bl-list-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    gap: 15px;
    margin-left: 20px; 
}

/* TRIGGER BUTTON STYLE */
.bali-footer-btn.trigger-variant {
    position: relative !important; 
    bottom: auto !important;
    right: auto !important;
    background: #F3F4F6 !important; 
    color: #111827 !important;     
    border: none !important;
    flex-shrink: 0;
}

/* --- LAYER A: Cards --- */
.bali-pricing-layer-cards {
    transition: opacity 0.3s ease;
    width: 100%;
}

/* --- LAYER B: Overlay --- */
.bali-pricing-layer-overlay {
    position: absolute;
    inset: 0; 
    z-index: 50;
    
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    
    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    overflow: hidden; 
}

.bali-overlay-inner {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; /* Ensure full height usage */
}

/* --- CONTENT STYLING --- */
.bl-overlay-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #9CA3AF;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.home-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    list-style: none;
    padding: 0;
    margin: 0 auto 20px auto; 
    text-align: left;
    width: 100%;
}

.home-list-grid li {
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
}

/* Button Container */
.bl-overlay-cta {
    margin-bottom: 15px; 
}
.bl-overlay-cta .bali-salmon-btn {
    width: 100%;
    max-width: 280px;
    display: inline-block;
    text-align: center;
    padding: 12px 20px; 
}

/* NOTE */
.bl-features-note {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 10px;
    max-width: 90%; 
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

/* CLOSE BUTTON (Bottom Right) */
.bali-footer-btn.close-variant {
    position: absolute !important;
    bottom: 15px !important;
    right: 15px !important;
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: none !important;
    z-index: 60;
    width: 40px !important;
    height: 40px !important;
}
.bali-footer-btn.close-variant:hover { background: #E5E7EB !important; }

/* --- INTERACTIVE STATE (Open) --- */
.interactive-card.is-open .bali-pricing-layer-overlay {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.interactive-card.is-open .bali-pricing-layer-cards {
    opacity: 0; 
    pointer-events: none;
}
.interactive-card.is-open .trigger-variant .bali-plus-icon {
    transform: rotate(45deg);
}

/* =========================================
   AGGRESSIVE MOBILE OPTIMIZATION 
   ========================================= */
@media (max-width: 767px) {
    
    /* 1. EXTEND OVERLAY UPWARDS & ADJUST PADDING */
    .bali-pricing-layer-overlay {
        display: flex !important;
        flex-direction: column !important;
        
        top: -40px !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        
        /* THE FINAL FIX: Reduced top padding to 8px */
        padding-top: 8px !important;
    }

    .bali-overlay-inner {
        padding: 0 15px 15px 15px !important;
        justify-content: flex-start !important;
        height: 100% !important;
    }

    /* 2. HEADER TIGHT */
    .bl-overlay-title {
        margin-bottom: 8px !important;
        margin-top: 0 !important;
        font-size: 12px !important;
    }

    /* 3. LIST COMPACT */
    .home-list-grid {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        margin-bottom: 10px !important;
    }
    .home-list-grid li {
        font-size: 13px !important;
    }

/* 4. BUTTON: ABSOLUTE POSITION ABOVE FOOTNOTE - OVERLAY ONLY */
.bali-pricing-layer-overlay .bl-overlay-cta {
    position: absolute !important;
    bottom: 45px !important;
    left: 15px !important;
    margin: 0 !important;
    width: auto !important;
    text-align: left !important;
}
.bali-pricing-layer-overlay .bl-overlay-cta .bali-salmon-btn {
    width: auto !important;
    min-width: 200px !important;
    padding: 10px 25px !important;
    display: inline-block !important;
}

/* 5. FOOTNOTE: ABSOLUTE POSITION AT BOTTOM - OVERLAY ONLY */
.bali-pricing-layer-overlay .bl-features-note {
    position: absolute !important;
    bottom: 5px !important;
    left: 15px !important;
    right: 55px !important;
    margin: 0 !important;
    font-size: 10px !important;
    text-align: left !important;
    padding: 0 !important;
    border-top: none !important;
}

    /* 6. CLOSE BUTTON & TRIGGER FIXES */
    .bali-footer-btn.close-variant {
        bottom: 12px !important;
        right: 12px !important;
        width: 38px !important;
        height: 38px !important;
    }
    .bl-list-trigger {
        justify-content: space-between !important;
        margin-left: 0 !important;
        padding-right: 0px !important; 
    }
}