/* BKIW — global alert / confirm / toast */
.bkiw-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.bkiw-dialog-root.is-open {
    opacity: 1;
    visibility: visible;
}

.bkiw-dialog-card {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease;
}

.bkiw-dialog-root.is-open .bkiw-dialog-card {
    transform: translateY(0) scale(1);
}

.bkiw-dialog-body {
    padding: 28px 28px 20px;
    text-align: center;
}

.bkiw-dialog-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bkiw-dialog-icon.info {
    background: #eff6ff;
    color: #2563eb;
}

.bkiw-dialog-icon.success {
    background: #ecfdf5;
    color: #059669;
}

.bkiw-dialog-icon.warning {
    background: #fffbeb;
    color: #d97706;
}

.bkiw-dialog-icon.danger {
    background: #fef2f2;
    color: #dc2626;
}

.bkiw-dialog-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.bkiw-dialog-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    white-space: pre-wrap;
    word-break: break-word;
}

.bkiw-dialog-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.bkiw-dialog-actions button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.bkiw-dialog-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.bkiw-dialog-btn-cancel:hover {
    background: #e2e8f0;
}

.bkiw-dialog-btn-confirm {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.28);
}

.bkiw-dialog-btn-confirm:hover {
    filter: brightness(1.03);
}

.bkiw-dialog-btn-confirm.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}

.bkiw-dialog-actions.single button {
    max-width: 180px;
    margin: 0 auto;
}

/* Toast */
.bkiw-toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 13000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.bkiw-toast {
    min-width: 280px;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    border-left: 4px solid #3498db;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: bkiwToastIn 0.28s ease;
}

.bkiw-toast.success { border-left-color: #10b981; }
.bkiw-toast.warning { border-left-color: #f59e0b; }
.bkiw-toast.error { border-left-color: #ef4444; }

.bkiw-toast i {
    font-size: 18px;
    margin-top: 2px;
    color: #3498db;
}

.bkiw-toast.success i { color: #10b981; }
.bkiw-toast.warning i { color: #f59e0b; }
.bkiw-toast.error i { color: #ef4444; }

.bkiw-toast-content {
    flex: 1;
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

.bkiw-toast.is-leaving {
    animation: bkiwToastOut 0.25s ease forwards;
}

@keyframes bkiwToastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bkiwToastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(24px); }
}

body.bkiw-dialog-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .bkiw-dialog-root {
        padding: 12px;
    }

    .bkiw-dialog-actions {
        flex-direction: column-reverse;
    }
}
