@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.payment-package {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-package.selected {
    border-color: #db2777;
    background-color: #fdf2f8;
    box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.2);
}

/* --- FIX: OVERLAY STYLES --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    /* FIX: Highest Z-Index ensures it is ALWAYS on top of Header */
    z-index: 100; 
    /* FIX: Padding prevents card from touching screen edges/header */
    padding: 20px; 
}

/* Hiding logic */
.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

/* --- MOBILE SPECIFIC FIXES --- */
@media (max-width: 640px) {
    /* Profile Modal: Bottom Sheet style */
    #profile-modal.modal-overlay {
        align-items: flex-end; /* Push to bottom */
        padding: 0; /* Remove padding for full width feel at bottom */
    }
    
    /* Ensure Profile Modal X button has space from top of screen */
    #profile-modal .modal-content {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-height: 85vh; /* Leave space at top for user to click 'back' */
    }

    /* Location Modal: Keep it centered but add breathing room */
    #location-modal.modal-overlay {
        align-items: center;
        padding: 2rem; /* Adds space around the card so it looks clean */
    }
}

#fullscreen-modal.flex {
    opacity: 1 !important;
}