/* === Tema global para SweetAlert2 (cliente, admin, superadmin) === */

/* Popup base — bordes redondeados, sombra premium, fuente */
.swal2-popup {
    border-radius: 24px !important;
    padding: 22px 22px 18px !important;
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.25), 0 18px 36px -18px rgba(15, 23, 42, 0.18) !important;
    font-family: var(--font-body, 'DM Sans', system-ui, sans-serif) !important;
    max-width: 92vw !important;
    width: auto !important;
}

/* Backdrop más suave */
.swal2-container.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(2px);
}

/* Título — tipografía editorial */
.swal2-popup .swal2-title {
    font-family: var(--font-head, 'Playfair Display', serif) !important;
    color: var(--ink, #0f172a) !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    padding: 8px 6px 4px !important;
    line-height: 1.25 !important;
}

/* Contenido HTML / texto */
.swal2-popup .swal2-html-container {
    color: var(--muted, #64748b) !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    padding: 4px 6px 0 !important;
    margin: 0 !important;
}
.swal2-popup .swal2-html-container b,
.swal2-popup .swal2-html-container strong {
    color: var(--ink, #0f172a) !important;
    font-weight: 800 !important;
}

/* Iconos — colores acordes a la marca, sin tocar geometría interna (preserva animaciones) */
.swal2-popup .swal2-icon {
    margin: 8px auto 10px !important;
}
.swal2-popup .swal2-icon.swal2-warning { border-color: #f59e0b !important; color: #f59e0b !important; }
.swal2-popup .swal2-icon.swal2-error { border-color: #ef4444 !important; color: #ef4444 !important; }
.swal2-popup .swal2-icon.swal2-info { border-color: var(--primary, #6366f1) !important; color: var(--primary, #6366f1) !important; }
.swal2-popup .swal2-icon.swal2-question { border-color: var(--primary, #6366f1) !important; color: var(--primary, #6366f1) !important; }
/* Success: solo color, sin tocar líneas de la animación */
.swal2-popup .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(16,185,129,0.3) !important; }
.swal2-popup .swal2-icon.swal2-success .swal2-success-line-tip,
.swal2-popup .swal2-icon.swal2-success .swal2-success-line-long { background-color: #10b981 !important; }
.swal2-popup .swal2-icon.swal2-success [class^='swal2-success-circular-line'] { background-color: transparent !important; }

/* 🔒 GARANTÍA NUCLEAR ANTI-BOTONES "NO / CANCEL" INNECESARIOS:
   POR DEFECTO, LOS BOTONES swal2-cancel y swal2-deny ESTÁN SIEMPRE OCULTOS (!important).
   Solo se muestran TEMPORALMENTE cuando el SWAL FIRE PATCHER aplica inline style="display:inline-flex !important"
   al nodo button, PERO SOLAMENTE si el llamado JS EXPLÍCITAMENTE puso showCancelButton:true o showDenyButton:true.
   → De esta forma NO HAY MANERA de que aparezcan por error, cache, mixin legacy, o defaults de librería.
   CSS gana siempre salvo inline !important que solo el patcher pone. */
.swal2-popup .swal2-cancel.swal2-styled { display: none !important; }
.swal2-popup .swal2-deny.swal2-styled   { display: none !important; }

/* Acciones — botones consistentes */
.swal2-popup .swal2-actions {
    gap: 10px !important;
    margin: 18px 4px 4px !important;
    padding: 0 !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.swal2-popup .swal2-styled {
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    padding: 12px 22px !important;
    min-height: 44px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    border: none !important;
    cursor: pointer;
    transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
    letter-spacing: 0.02em;
}
.swal2-popup .swal2-styled:active {
    transform: scale(0.97) !important;
}
.swal2-popup.swal2-wants-cancel.swal2-wants-deny .swal2-styled,
.swal2-popup.swal2-wants-cancel .swal2-styled,
.swal2-popup.swal2-wants-deny   .swal2-styled {
    /* Cuando sí hay botones extra, mantener flex 1 */
}
.swal2-popup .swal2-confirm.swal2-styled {
    background: var(--grad, linear-gradient(135deg, #6366f1, #ec4899)) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.55) !important;
}
.swal2-popup .swal2-confirm.swal2-styled:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(99, 102, 241, 0.7) !important;
}
.swal2-popup .swal2-confirm.swal2-styled:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 10px 22px -10px rgba(99, 102, 241, 0.55) !important;
}
.swal2-popup .swal2-cancel.swal2-styled {
    background: #f1f5f9 !important;
    color: var(--ink, #0f172a) !important;
}
.swal2-popup .swal2-cancel.swal2-styled:hover {
    background: #e2e8f0 !important;
    transform: translateY(-1px);
}
.swal2-popup .swal2-deny.swal2-styled {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}
.swal2-popup .swal2-deny.swal2-styled:hover {
    background: #fecaca !important;
    transform: translateY(-1px);
}

/* Dark mode fixes */
html[data-theme="dark"] .swal2-popup {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
}
html[data-theme="dark"] .swal2-popup .swal2-cancel.swal2-styled {
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--ink) !important;
}
html[data-theme="dark"] .swal2-popup .swal2-cancel.swal2-styled:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="dark"] .swal2-popup .swal2-deny.swal2-styled {
    background: rgba(239, 68, 68, 0.14) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    color: #fecaca !important;
}
html[data-theme="dark"] .swal2-popup .swal2-deny.swal2-styled:hover {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* Inputs dentro de Swal */
.swal2-popup .swal2-input,
.swal2-popup .swal2-textarea,
.swal2-popup .swal2-select {
    border-radius: 12px !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    color: var(--ink, #0f172a) !important;
    padding: 12px 14px !important;
    margin: 8px auto !important;
}
.swal2-popup .swal2-input:focus,
.swal2-popup .swal2-textarea:focus,
.swal2-popup .swal2-select:focus {
    border-color: var(--primary, #6366f1) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

/* Validación */
.swal2-popup .swal2-validation-message {
    border-radius: 12px !important;
    background: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 700 !important;
    margin-top: 10px !important;
}

/* Toast (Swal.mixin({toast:true})) — sin alterar mucho */
.swal2-popup.swal2-toast {
    border-radius: 16px !important;
    padding: 14px 16px !important;
}
.swal2-popup.swal2-toast .swal2-title { font-size: 0.9rem !important; }

/* Footer */
.swal2-popup .swal2-footer {
    color: var(--muted, #64748b) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-top: 1px solid var(--border, #e2e8f0) !important;
    padding-top: 12px !important;
    margin-top: 14px !important;
}

/* Botón cerrar (X) */
.swal2-popup .swal2-close {
    color: var(--muted, #64748b) !important;
    font-size: 1.6rem !important;
    transition: color .15s ease, transform .15s ease;
}
.swal2-popup .swal2-close:hover {
    color: var(--ink, #0f172a) !important;
    transform: scale(1.05);
}

/* Móvil — paddings reducidos */
@media (max-width: 480px) {
    .swal2-popup { padding: 18px 16px 14px !important; border-radius: 22px !important; }
    .swal2-popup .swal2-title { font-size: 1.15rem !important; }
    .swal2-popup .swal2-html-container { font-size: 0.86rem !important; }
    .swal2-popup .swal2-styled { font-size: 0.86rem !important; padding: 11px 14px !important; }
}
@media (max-height: 640px) {
    .swal2-popup { padding: 14px 14px 12px !important; }
    .swal2-popup .swal2-title { font-size: 1.05rem !important; padding: 4px !important; }
}

/* === Modal premium "Antes de reservar" (mantiene su variante especial) === */
.swal2-popup.brc-popup { padding: 0 !important; max-width: 420px !important; width: 92vw !important; overflow: hidden; }
.swal2-popup.brc-popup .swal2-html-container { padding: 0 !important; }
