/* ============================================
   toast.css
   Styling untuk komponen notifikasi toast (lihat toast.js)
   + modal konfirmasi (lihat log.js).
   semua halaman yang butuh notifikasi "berhasil/gagal" atau konfirmasi
   ============================================ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    pointer-events: none;
}
.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    border-left: 4px solid #64748b;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    font-size: 12.5px;
    color: #0f172a;
    animation: toast-in 0.25s ease forwards;
}
.toast-item.toast-hide {
    animation: toast-out 0.3s ease forwards;
}
.toast-success { border-left-color: #16a34a; }
.toast-success .toast-icon { color: #16a34a; }
.toast-error { border-left-color: #dc2626; }
.toast-error .toast-icon { color: #dc2626; }
.toast-warning { border-left-color: #f59e0b; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info { border-left-color: #1d4ed8; }
.toast-body-sm { font-size: 14px; }
.toast-info .toast-icon { color: #1d4ed8; }
.toast-icon {
    font-size: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}
.toast-text {
    flex: 1;
    line-height: 1.4;
}
.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    flex-shrink: 0;
}
.toast-close:hover {
    color: #475569;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(24px); }
}
@media (max-width: 480px) {
    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
        max-width: none;
    }
}

/* ============================================
   Toast Bootstrap (dipakai oleh showToast() di
   import_gangguan.js — beda struktur dari
   .toast-item di atas: elemen ini pakai class
   Bootstrap "toast" + text-white, jadi butuh
   background-color sendiri di sini supaya
   teksnya (putih) tidak invisible di atas
   latar putih default Bootstrap.
   ============================================ */
.toast.toast-success { background-color: #16a34a; }
.toast.toast-error   { background-color: #dc2626; }
.toast.toast-warning  { background-color: #f59e0b; }
.toast.toast-info     { background-color: #1d4ed8; }

/* ============================================
   Modal Konfirmasi (dipakai oleh log.js)
   Menggantikan window.confirm() bawaan browser
   untuk tombol/form ber-atribut data-confirm.
   ============================================ */
.confirm-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.45);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:10000;
    opacity:0;
    visibility:hidden;
    transition:opacity .18s ease;
    padding:16px;
    font-family:'Inter','Segoe UI',Tahoma,sans-serif;
}
.confirm-overlay.show{
    opacity:1;
    visibility:visible;
}
.confirm-box{
    background:#fff;
    border-radius:16px;
    max-width:340px;
    width:100%;
    padding:20px 20px 16px;
    box-shadow:0 20px 50px rgba(15,23,42,.25);
    text-align:center;
    transform:translateY(8px) scale(.98);
    transition:transform .18s ease;
}
.confirm-overlay.show .confirm-box{
    transform:translateY(0) scale(1);
}
.confirm-icon{
    width:44px;
    height:44px;
    margin:0 auto 10px;
    border-radius:999px;
    background:#fff7e8;
    color:#f59e0b;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
}
.confirm-message{
    font-size:13px;
    color:#0f172a;
    font-weight:600;
    line-height:1.4;
    margin-bottom:16px;
    word-break:break-word;
}
.confirm-actions{
    display:flex;
    gap:8px;
}
.confirm-btn{
    flex:1;
    padding:9px 12px;
    border-radius:10px;
    border:none;
    font-size:12.5px;
    font-weight:700;
    cursor:pointer;
}
.confirm-btn-cancel{
    background:#f1f5f9;
    color:#475569;
}
.confirm-btn-cancel:hover{
    background:#e2e8f0;
}
.confirm-btn-ok{
    background:#dc2626;
    color:#fff;
}
.confirm-btn-ok:hover{
    background:#b91c1c;
}