/* =============================================================================
   SweetAlert2 Elegant — restyling global aplicado a TODOS los Swal.fire del POS.
   Mejora: bordes redondeados, gradients en botones, focus states accesibles,
   contraste de texto, jerarquia visual mas moderna.
   Las clases helper (.swal-card-info, .swal-warn, .swal-row) son opt-in y se
   usan vía customClass o html string en alerts que necesitan layout enriquecido.
   ============================================================================= */

/* Popup base */
.swal2-popup {
    border-radius: 16px !important;
    padding: 22px 22px 26px !important;
    box-shadow: 0 24px 48px rgba(50, 50, 93, 0.18), 0 12px 18px rgba(0, 0, 0, 0.06) !important;
}

/* Titulo */
.swal2-title {
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    color: #32325d !important;
    line-height: 1.3 !important;
}

/* Texto principal */
.swal2-html-container,
.swal2-content {
    color: #525f7f !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Iconos: contornos mas suaves y colores Argon */
.swal2-icon {
    width: 72px !important;
    height: 72px !important;
    margin: 8px auto 16px !important;
    border-width: 3px !important;
}
.swal2-icon.swal2-warning {
    border-color: #fde68a !important;
    color: #f59e0b !important;
    background: #fffbeb !important;
}
.swal2-icon.swal2-error {
    border-color: #fecaca !important;
    color: #e11d48 !important;
    background: #fff5f5 !important;
}
.swal2-icon.swal2-success {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
}
.swal2-icon.swal2-info {
    border-color: #bfdbfe !important;
    color: #3b82f6 !important;
    background: #eff6ff !important;
}
.swal2-icon.swal2-question {
    border-color: #ddd6fe !important;
    color: #7c3aed !important;
    background: #f5f3ff !important;
}

/* Botones */
.swal2-actions {
    margin-top: 18px !important;
    gap: 8px;
}
.swal2-styled {
    border-radius: 8px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: 0.2px !important;
    box-shadow: 0 4px 12px rgba(50, 50, 93, 0.12) !important;
    transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}
.swal2-styled:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}
.swal2-styled:focus {
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.25), 0 4px 12px rgba(50, 50, 93, 0.12) !important;
}

/* Confirm button: gradient cuando es accion peligrosa, azul Argon por defecto */
.swal2-confirm.swal2-styled {
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%) !important;
    border: none !important;
    color: #fff !important;
}
.swal2-confirm.swal2-styled:hover {
    box-shadow: 0 6px 18px rgba(94, 114, 228, 0.35) !important;
}

/* Cuando un confirm tiene confirmButtonColor con tonos rojos, le aplicamos gradient rojo via clase */
.swal2-confirm.btn-danger-elegant,
.swal2-confirm.swal-btn-danger {
    background: linear-gradient(135deg, #f5365c 0%, #e11d48 100%) !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25) !important;
}
.swal2-confirm.btn-danger-elegant:hover,
.swal2-confirm.swal-btn-danger:hover {
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.4) !important;
}

/* Cancel button: gris claro, sin shadow fuerte */
.swal2-cancel.swal2-styled {
    background: #f6f9fc !important;
    border: 1px solid #e9ecef !important;
    color: #525f7f !important;
    box-shadow: none !important;
}
.swal2-cancel.swal2-styled:hover {
    background: #edf0f5 !important;
    transform: translateY(-1px);
}

/* Inputs dentro de Swal */
.swal2-input,
.swal2-textarea,
.swal2-select {
    border-radius: 8px !important;
    border: 1px solid #cad1d7 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    color: #32325d !important;
    padding: 10px 12px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: #5e72e4 !important;
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.15) !important;
    outline: none !important;
}

/* Validation message */
.swal2-validation-message {
    border-radius: 8px !important;
    background: #fff5f5 !important;
    color: #b91c1c !important;
    border-left: 3px solid #e11d48 !important;
}

/* Toast (notificaciones esquina) */
.swal2-toast {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(50, 50, 93, 0.15), 0 4px 8px rgba(0, 0, 0, 0.05) !important;
}
.swal2-toast .swal2-title {
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* =============================================================================
   Helpers opt-in: clases para alerts con layout enriquecido (info card,
   warning banner, filas de detalle). Uso desde JS via customClass o html.
   ============================================================================= */

.swal2-html-container .swal-warn {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
    border-left: 3px solid #e11d48;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #7f1d1d;
    line-height: 1.4;
    margin-bottom: 14px;
    text-align: left;
}
.swal2-html-container .swal-warn i {
    color: #e11d48;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.swal2-html-container .swal-info {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 3px solid #3b82f6;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #1e3a8a;
    line-height: 1.4;
    margin-bottom: 14px;
    text-align: left;
}
.swal2-html-container .swal-info i {
    color: #3b82f6;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.swal2-html-container .swal-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-align: left;
}
.swal2-html-container .swal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    color: #fff;
    padding: 10px 14px;
}
.swal2-html-container .swal-card-header.is-danger {
    background: linear-gradient(135deg, #f5365c 0%, #e11d48 100%);
}
.swal2-html-container .swal-card-header.is-success {
    background: linear-gradient(135deg, #2dce89 0%, #1aae6f 100%);
}
.swal2-html-container .swal-card-title {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
}
.swal2-html-container .swal-card-amount {
    font-weight: 700;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 6px;
}
.swal2-html-container .swal-card-body {
    padding: 8px 14px;
}
.swal2-html-container .swal-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #f1f3f5;
    font-size: 13px;
}
.swal2-html-container .swal-row:last-child {
    border-bottom: none;
}
.swal2-html-container .swal-row-icon {
    color: #8898aa;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.swal2-html-container .swal-row-label {
    color: #8898aa;
    min-width: 64px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.swal2-html-container .swal-row-value {
    color: #32325d;
    font-weight: 500;
    flex: 1;
    word-break: break-word;
}

.swal2-html-container .swal-form {
    text-align: left;
    margin-top: 6px;
}
.swal2-html-container .swal-form-label {
    display: block;
    font-size: 12px;
    color: #525f7f;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.swal2-html-container .swal-form-textarea {
    width: 100%;
    border: 1px solid #cad1d7;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #32325d;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
}
.swal2-html-container .swal-form-textarea:focus {
    outline: none;
    border-color: #5e72e4;
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.15);
}
.swal2-html-container .swal-form-counter {
    text-align: right;
    font-size: 11px;
    color: #8898aa;
    margin-top: 4px;
}
