/* Popup/Toast styling */
.alert-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInDown 0.4s ease-out;
    border: none;
    font-weight: 500;
}

.alert-popup.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-popup.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-popup.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaba;
}

.alert-popup.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-popup .btn-close {
    opacity: 0.7;
}

.alert-popup .btn-close:hover {
    opacity: 1;
}

@keyframes slideInDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translate(-50%, -50%);
        opacity: 1;
    }

    to {
        transform: translate(-50%, -200%);
        opacity: 0;
    }
}

.alert-popup.fade-out {
    animation: slideOutUp 0.4s ease-in forwards;
}

/* Backdrop untuk popup */
.alert-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.alert-popup-backdrop.fade-out {
    animation: fadeOut 0.3s ease-in forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .alert-popup {
        max-width: 95%;
        margin: 0 auto;
    }
}