/* FULL SCREEN MODAL STYLES */
#note-modal,
#customer-input-modal,
#history-modal,
#customer-modal,
#notifications-modal {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Shipping Address Modal - Higher z-index to appear above customer-modal */
/* Shipping Modify Modal - Higher z-index to appear above shipping-address-modal */
#shipping-address-modal,
#shipping-modify-modal {
    z-index: 10000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Shipping Modify Modal has even higher z-index */
#shipping-modify-modal {
    z-index: 10001 !important;
}

/* Small modals (note, customer input) - bottom sheet style */
#note-modal .bg-white,
#customer-input-modal .bg-white {
    width: 100% !important;
    height: auto !important;
    max-width: 448px !important; /* Same as app-container max-w-md */
    max-height: 90vh !important;
    min-height: auto !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 auto !important; /* Center horizontally */
    position: relative !important;
    bottom: 0 !important;
}

/* Customer input modal - prevent closing by clicking outside */
#customer-input-modal {
    pointer-events: auto !important;
    /* Prevent closing by clicking outside or ESC key */
}

#customer-input-modal .bg-white {
    pointer-events: auto !important;
}

/* Ensure customer input modal cannot be closed accidentally */
#customer-input-modal:not(.hidden) {
    pointer-events: auto !important;
}

/* Full-height modals - same sizing for consistency */
#customer-modal .bg-white,
#order-modal .bg-white,
#voucher-modal .bg-white,
#shipping-address-modal .bg-white,
#shipping-modify-modal .bg-white,
#history-modal .bg-white,
#notifications-modal .bg-white {
    width: 100% !important;
    height: 100% !important;
    max-width: 448px !important; /* Same as app-container max-w-md */
    max-height: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 auto !important; /* Center horizontally */
}

/* Tier Benefits Modal Animation */
#tier-benefits-modal {
    animation: slideInUp 0.3s ease-out;
}

#tier-benefits-modal.hidden {
    animation: slideOutDown 0.3s ease-in;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Tier Benefits Cards Styling */
#tier-benefits-grid .bg-white {
    transition: all 0.3s ease;
    cursor: pointer;
}

#tier-benefits-grid .bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#tier-benefits-grid .bg-white.ring-2 {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.3s ease;
}

#customer-modal {
    animation: fadeIn 0.2s ease;
}

#note-modal {
    animation: fadeIn 0.2s ease;
}

/* Address List Styling in Shipping Address Modal */
#shipping-address-modal #address-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important; /* 8px spacing */
}

#shipping-address-modal #address-list > div {
    border-radius: 1rem !important; /* rounded-2xl */
    padding: 1rem !important; /* p-4 */
    margin: 0 !important; /* Remove any margin */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; /* shadow-md */
}

