/**
 * Tema oscuro global SweetAlert2 — alineado con Pilar (general.css)
 * Cargar después de sweetalert2.min.css
 */

:root {
    --swal-bg: #141821;
    --swal-bg-elevated: #1a2130;
    --swal-text: #f4f6fb;
    --swal-muted: #9aa3b5;
    --swal-border: rgba(255, 255, 255, 0.1);
    --swal-accent: #22c55e;
    --swal-accent-dark: #16a34a;
    --swal-danger: #f87171;
    --swal-warn: #fdba74;
    --swal-info: #93c5fd;
}

/* Contenedor / backdrop — por encima de modales Bootstrap (Revisar + Estado) */
.swal2-container {
    z-index: 10050 !important;
    background: rgba(6, 8, 12, 0.82) !important;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(6, 8, 12, 0.82) !important;
}

/* Popup principal */
.swal2-popup {
    background: var(--swal-bg) !important;
    color: var(--swal-text) !important;
    border: 1px solid var(--swal-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55) !important;
    padding: 1.35rem 1.25rem 1.1rem !important;
}

.swal2-popup.swal2-toast {
    background: var(--swal-bg-elevated) !important;
    border: 1px solid var(--swal-border) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

.swal2-popup.swal2-toast .swal2-title {
    color: var(--swal-text) !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
    color: var(--swal-muted) !important;
}

/* Título y texto */
.swal2-title {
    color: var(--swal-text) !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: var(--swal-muted) !important;
}

.swal2-content {
    color: var(--swal-muted) !important;
}

/* Cerrar (X) */
.swal2-close {
    color: var(--swal-muted) !important;
    transition: color 0.15s ease, background 0.15s ease !important;
}

.swal2-close:hover {
    color: var(--swal-text) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.swal2-close:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35) !important;
}

/* Iconos */
.swal2-icon {
    border-width: 3px !important;
}

.swal2-icon.swal2-question {
    border-color: rgba(59, 130, 246, 0.45) !important;
    color: var(--swal-info) !important;
}

.swal2-icon.swal2-success {
    border-color: rgba(34, 197, 94, 0.45) !important;
    color: #86efac !important;
}

.swal2-icon.swal2-error {
    border-color: rgba(248, 113, 113, 0.45) !important;
    color: var(--swal-danger) !important;
}

.swal2-icon.swal2-warning {
    border-color: rgba(251, 146, 60, 0.45) !important;
    color: var(--swal-warn) !important;
}

.swal2-icon.swal2-info {
    border-color: rgba(59, 130, 246, 0.45) !important;
    color: var(--swal-info) !important;
}

.swal2-success-ring {
    border-color: rgba(34, 197, 94, 0.28) !important;
}

.swal2-success-line-tip,
.swal2-success-line-long {
    background-color: #86efac !important;
}

.swal2-x-mark-line-left,
.swal2-x-mark-line-right {
    background-color: var(--swal-danger) !important;
}

/* Botones */
.swal2-actions {
    gap: 0.65rem !important;
    margin-top: 1rem !important;
}

.swal2-styled {
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.55rem 1.25rem !important;
    box-shadow: none !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--swal-accent), var(--swal-accent-dark)) !important;
    color: #052e16 !important;
    border: none !important;
}

.swal2-confirm:hover {
    filter: brightness(1.08) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35) !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--swal-text) !important;
    border: 1px solid var(--swal-border) !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.swal2-deny {
    background: rgba(248, 113, 113, 0.18) !important;
    color: #fecaca !important;
    border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

.swal2-deny:hover {
    background: rgba(248, 113, 113, 0.28) !important;
}

/* Inputs dentro del modal */
.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-file {
    background: rgba(0, 0, 0, 0.28) !important;
    border: 1px solid var(--swal-border) !important;
    color: var(--swal-text) !important;
    border-radius: 10px !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: rgba(34, 197, 94, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12) !important;
}

.swal2-validation-message {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fecaca !important;
}

/* Barra de progreso (timer) */
.swal2-timer-progress-bar {
    background: rgba(34, 197, 94, 0.65) !important;
}

/* Footer */
.swal2-footer {
    border-top-color: var(--swal-border) !important;
    color: var(--swal-muted) !important;
}

/* Checkbox / radio en modales */
.swal2-checkbox label,
.swal2-radio label {
    color: var(--swal-text) !important;
}
