/* SweetAlert2 — estilo global Rodamientos Blanco */

.swal2-container {
    z-index: 20000 !important;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: rgba(15, 23, 42, 0.45) !important;
}

.swal2-popup.swal-rb-popup,
.swal2-popup:not(.swal-mail-asunto):not(.swal-mail-contactos-popup) {
    width: min(26rem, calc(100vw - 2rem));
    padding: 1.75rem 1.5rem 1.55rem;
    border-radius: 1rem !important;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.08),
        0 22px 44px -12px rgba(15, 23, 42, 0.28) !important;
    background: #ffffff !important;
    color: #0f172a;
    font-family: inherit;
    overflow: hidden;
}

.swal2-popup .swal2-title {
    padding: 0 !important;
    margin: 0 0 0.45rem !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1.35;
    color: #0f172a !important;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
}

.swal2-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.5;
    color: #64748b !important;
    font-weight: 450;
    position: relative;
    z-index: 2;
}

/* Contenedor de icono — círculo limpio, sin animaciones SA2 */
.swal2-popup .swal2-icon {
    margin: 0 auto 1.05rem !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
    min-width: 3.5rem !important;
    min-height: 3.5rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    overflow: hidden !important;
}

.swal2-popup .swal2-icon.swal-rb-icon-plain > *:not(.swal2-icon-content) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.swal2-popup .swal2-icon .swal2-icon-content {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
}

/* Glifos estáticos */
.swal-rb-glyph {
    display: inline-block;
    position: relative;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
}

.swal-rb-glyph--ok {
    width: 0.72rem;
    height: 1.2rem;
    border: solid #ff5f00;
    border-width: 0 0.24rem 0.24rem 0;
    transform: rotate(45deg);
    margin-top: -0.2rem;
}

.swal-rb-glyph--err {
    width: 1.25rem;
    height: 1.25rem;
}

.swal-rb-glyph--err::before,
.swal-rb-glyph--err::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.22rem;
    height: 1.25rem;
    background: #dc2626;
    border-radius: 2px;
}

.swal-rb-glyph--err::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.swal-rb-glyph--err::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.swal-rb-glyph--warn {
    color: #c2410c;
    font-size: 1.7rem;
    font-weight: 800;
}

.swal-rb-glyph--info {
    color: #1d4ed8;
    font-size: 1.55rem;
    font-weight: 800;
    text-transform: lowercase;
}

/* Fondos por tipo */
.swal2-popup .swal2-icon.swal2-success,
.swal2-popup .swal2-icon.swal-rb-icon-success {
    background: rgba(255, 95, 0, 0.14) !important;
    color: #003b71;
}

.swal2-popup .swal2-icon.swal2-error,
.swal2-popup .swal2-icon.swal-rb-icon-error {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #b91c1c;
}

.swal2-popup .swal2-icon.swal2-warning,
.swal2-popup .swal2-icon.swal-rb-icon-warning {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #c2410c;
}

.swal2-popup .swal2-icon.swal2-info,
.swal2-popup .swal2-icon.swal2-question,
.swal2-popup .swal2-icon.swal-rb-icon-info,
.swal2-popup .swal2-icon.swal-rb-icon-question {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #1d4ed8;
}

/* Por si queda basura del SVG/animación nativa */
.swal2-popup .swal2-icon.swal2-success .swal2-success-ring,
.swal2-popup .swal2-icon.swal2-success [class*=swal2-success-circular],
.swal2-popup .swal2-icon.swal2-success .swal2-success-fix-tip,
.swal2-popup .swal2-icon.swal2-success [class*=swal2-success-line],
.swal2-popup .swal2-icon.swal2-error .swal2-x-mark,
.swal2-popup .swal2-icon.swal2-error [class*=swal2-x-mark-line] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: transparent !important;
    border-color: transparent !important;
}

.swal2-popup .swal2-actions {
    margin: 1.15rem 0 0 !important;
    gap: 0.5rem;
    width: 100%;
}

.swal2-popup .swal2-styled {
    margin: 0 !important;
    min-height: 2.5rem;
    padding: 0.55rem 1.15rem !important;
    border-radius: 0.65rem !important;
    font-size: 0.875rem !important;
    font-weight: 650 !important;
    box-shadow: none !important;
    transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.swal2-popup .swal2-styled:focus {
    box-shadow: 0 0 0 3px rgba(255, 95, 0, 0.18) !important;
}

.swal2-popup .swal2-confirm,
.swal2-popup .swal-rb-confirm {
    background: linear-gradient(135deg, #003b71 0%, #ff5f00 55%, #ff7a2e 100%) !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(255, 95, 0, 0.28) !important;
}

.swal2-popup .swal2-confirm:hover {
    filter: brightness(1.04);
}

.swal2-popup .swal2-deny,
.swal2-popup .swal-rb-deny {
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
}

.swal2-popup .swal2-cancel,
.swal2-popup .swal-rb-cancel {
    background: #f1f5f9 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
}

.swal2-popup .swal2-cancel:hover {
    background: #e2e8f0 !important;
}

.swal2-popup .swal2-close {
    color: #94a3b8 !important;
    font-size: 1.5rem !important;
    transition: color 0.15s ease;
}

.swal2-popup .swal2-close:hover {
    color: #003b71 !important;
}

.swal2-popup .swal2-input,
.swal2-popup .swal2-textarea,
.swal2-popup .swal2-select,
.swal2-popup .swal2-file {
    border-radius: 0.65rem !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

.swal2-popup .swal2-input:focus,
.swal2-popup .swal2-textarea:focus,
.swal2-popup .swal2-select:focus {
    border-color: rgba(255, 95, 0, 0.45) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 95, 0, 0.12) !important;
}

.swal2-popup .swal2-validation-message {
    margin: 0.5rem 0 0 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #b91c1c !important;
    border: 0 !important;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

.swal2-popup .swal2-timer-progress-bar-container {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    grid-column: 1 / -1 !important;
    height: 4px !important;
    overflow: hidden;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    background: rgba(15, 23, 42, 0.06);
}

.swal2-popup .swal2-timer-progress-bar {
    height: 100% !important;
    background: #ff5f00 !important;
}

.swal2-popup .swal2-footer {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: #94a3b8;
    font-size: 0.8rem;
}

.swal2-container.swal2-top-end > .swal2-popup,
.swal2-container.swal2-top > .swal2-popup,
.swal2-popup.swal2-toast {
    width: auto;
    max-width: min(22rem, calc(100vw - 1.5rem));
    padding: 0.85rem 1rem !important;
    border-radius: 0.85rem !important;
}

.swal2-popup.swal2-toast .swal2-title {
    font-size: 0.95rem !important;
    margin-bottom: 0.15rem !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
    font-size: 0.8rem !important;
}

.swal2-popup.swal2-toast .swal2-icon {
    margin: 0 0.65rem 0 0 !important;
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
}

[data-layout-mode="dark"] .swal2-popup:not(.swal-mail-asunto):not(.swal-mail-contactos-popup) {
    background: #1e2433 !important;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

[data-layout-mode="dark"] .swal2-popup .swal2-title {
    color: #f8fafc !important;
}

[data-layout-mode="dark"] .swal2-popup .swal2-html-container {
    color: #94a3b8 !important;
}

[data-layout-mode="dark"] .swal2-popup .swal2-cancel {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

[data-layout-mode="dark"] .swal2-container.swal2-backdrop-show {
    background: rgba(2, 6, 23, 0.62) !important;
}
