/* Container untuk toast */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    /* Penting: agar tidak menghalangi klik di bawahnya */
}

/* Gaya dasar untuk setiap toast message */
.toast-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: auto;
    /* Aktifkan kembali pointer events */
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Gaya untuk jenis success */
.toast-message.success {
    background-color: #4caf50;
    /* Hijau */
    color: white;
}

/* Gaya untuk jenis error */
.toast-message.error {
    background-color: #f44336;
    /* Merah */
    color: white !important;
}

/* Gaya untuk icon */
.toast-icon {
    font-size: 20px;
    margin-right: 12px;
}

/* Gaya untuk teks pesan */
.toast-text {
    flex-grow: 1;
}

/* Tombol tutup */
.toast-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    margin-left: 12px;
    cursor: pointer;
    line-height: 1;
}

/* Gaya untuk toast yang sedang tampil */
.toast-message.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Tambahan: Transisi untuk toast yang menghilang */
.toast-message.hide {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
}
