/* ============================================
   TOASTS + CONFIRM — notificaciones del tema
   ============================================ */

.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(380px, calc(100vw - 40px));
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--text-secondary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.5;
    cursor: pointer;
    opacity: 0;
    transform: translateX(110%);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.visible { opacity: 1; transform: translateX(0); }
.toast.salida { opacity: 0; transform: translateX(30%); }

.toast > i { font-size: 14px; margin-top: 1px; flex-shrink: 0; }

.toast-success { border-left-color: var(--accent-green); }
.toast-success > i { color: var(--accent-green); }

.toast-error { border-left-color: var(--accent-red); }
.toast-error > i { color: var(--accent-red); }

.toast-warning { border-left-color: #FFAB00; }
.toast-warning > i { color: #FFAB00; }

.toast-info { border-left-color: var(--accent-blue); }
.toast-info > i { color: var(--accent-blue); }

.toast-msg {
    flex: 1;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    padding: 2px 3px;
    line-height: 1;
    flex-shrink: 0;
    transition: var(--transition);
}

.toast-close:hover { color: var(--accent-red); }

/* ---------- CONFIRM MODAL ---------- */
.toast-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.toast-confirm-overlay.visible { opacity: 1; }

.toast-confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 24px 22px;
    width: min(380px, calc(100vw - 40px));
    transform: translateY(10px);
    transition: transform 0.2s ease;
}

.toast-confirm-overlay.visible .toast-confirm-box { transform: translateY(0); }

.toast-confirm-icon {
    text-align: center;
    color: var(--accent-orange);
    font-size: 28px;
    margin-bottom: 12px;
}

.toast-confirm-msg {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 20px;
}

.toast-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.toast-confirm-actions .tc-ok { min-width: 120px; justify-content: center; }
.toast-confirm-actions .tc-cancelar { min-width: 100px; justify-content: center; }
.toast-confirm-actions .tc-danger { background: var(--accent-red); }
.toast-confirm-actions .tc-danger:hover { background: var(--accent-red); filter: brightness(1.15); }

/* ---------- MOVIL: toasts abajo, ancho completo ---------- */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
    }
    .toast { transform: translateY(120%); }
    .toast.visible { transform: translateY(0); }
    .toast.salida { opacity: 0; transform: translateY(30%); }
}
