/* ============================================================
   Prime Ticket — SweetAlert2 global theme
   Loaded after the sweetalert2 CDN styles in every layout
   (component/index, component/clientIndex, layouts/app).
   !important is required: sweetalert2 injects inline colors
   (confirmButtonColor) and per-page styles that must lose.
   Destructive confirms opt in via:
   customClass: { confirmButton: 'pt-swal-danger' }
   ============================================================ */

/* SweetAlert2 place son conteneur à z-index:1060, ce qui le fait passer SOUS
   les feuilles/overlays de l'app (od-overlay 2000, guide d'envoi 4000/4001,
   visionneuse d'image 99999). Résultat : un confirm déclenché depuis une feuille
   ouverte s'affiche derrière et devient incliquable — cas vu sur /sells,
   popup « تفاصيل الطلب » → « تأكيد الإرسال ».
   Un confirm est bloquant : il doit toujours coiffer la pile. */
.swal2-container {
    z-index: 100010 !important;
}

.swal2-popup {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
    border-radius: 20px !important;
    padding: 2em 1.6em 1.7em !important;
    color: #2D2640 !important;
    box-shadow: 0 12px 40px rgba(11, 9, 20, 0.2) !important;
}

.swal2-title {
    font-family: inherit !important;
    color: #2D2640 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    padding-top: 0.4em !important;
}

.swal2-html-container,
.swal2-content {
    font-family: inherit !important;
    color: #5E5774 !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
}

.swal2-actions {
    gap: 10px !important;
    margin-top: 1.4em !important;
}

.swal2-styled {
    border-radius: 12px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    padding: 11px 22px !important;
    transition: all 0.15s ease !important;
}

.swal2-styled.swal2-confirm {
    background-color: #B5577E !important;
    background-image: linear-gradient(135deg, #6B5280, #B5577E, #C48EB0) !important;
    color: #fff !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 10px rgba(181, 87, 126, 0.25) !important;
}

.swal2-styled.swal2-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(181, 87, 126, 0.35) !important;
}

.swal2-styled.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(181, 87, 126, 0.25) !important;
}

.swal2-styled.swal2-confirm.pt-swal-danger {
    background-image: none !important;
    background-color: #C0392B !important;
    box-shadow: 0 2px 10px rgba(192, 57, 43, 0.25) !important;
}

.swal2-styled.swal2-confirm.pt-swal-danger:hover {
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.35) !important;
}

.swal2-styled.swal2-cancel,
.swal2-styled.swal2-deny {
    background-color: #fff !important;
    background-image: none !important;
    color: #5E5774 !important;
    border: 1.5px solid #E4E1EB !important;
    font-weight: 700 !important;
}

.swal2-styled.swal2-cancel:hover,
.swal2-styled.swal2-deny:hover {
    background-color: #FAFAFA !important;
    border-color: #C9C5D4 !important;
    color: #2D2640 !important;
}

/* ---- Icons: filled tinted circles instead of thin colored rings ---- */

.swal2-icon {
    border: none !important;
}

.swal2-icon .swal2-icon-content {
    font-weight: 700;
}

.swal2-icon.swal2-question {
    background: #EDE9F7 !important;
    color: #B5577E !important;
}

.swal2-icon.swal2-info {
    background: #EDE9F7 !important;
    color: #7B5E8E !important;
}

.swal2-icon.swal2-warning {
    background: #FAEEDA !important;
    color: #BA7517 !important;
}

.swal2-icon.swal2-error {
    background: #FBEBE9 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #C0392B !important;
}

.swal2-icon.swal2-success {
    background: #E8F5EE !important;
    color: #1D8348 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(29, 131, 72, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #1D8348 !important;
}

/* These patches assume a white popup behind the icon; on a tinted
   circle they show as white blocks, so make them invisible. */
.swal2-icon.swal2-success .swal2-success-fix,
.swal2-icon.swal2-success .swal2-success-circular-line-left,
.swal2-icon.swal2-success .swal2-success-circular-line-right {
    background: transparent !important;
}

/* ---- Loading + progress ---- */

.swal2-loader {
    border-color: #B5577E transparent #B5577E transparent !important;
}

.swal2-timer-progress-bar {
    background: #B5577E !important;
}

/* ---- Status chips used inside confirm dialogs (from → to) ---- */

.pt-swal-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
}

.pt-swal-chip {
    border-radius: 25px;
    padding: 4px 12px;
    color: #5E5774;
    background: #F3F2F6;
}

.pt-swal-chip-green  { color: #1D8348; background: #E8F5EE; }
.pt-swal-chip-amber  { color: #BA7517; background: #FAEEDA; }
.pt-swal-chip-red    { color: #C0392B; background: #FBEBE9; }
.pt-swal-chip-lilac  { color: #7B5E8E; background: #EDE9F7; }

.pt-swal-chips .pt-swal-arrow {
    color: #C9C5D4;
    font-weight: 400;
}

/* the arrow glyph (→) does not mirror automatically on RTL pages */
[dir='rtl'] .pt-swal-chips .pt-swal-arrow,
html[dir='rtl'] .pt-swal-chips .pt-swal-arrow {
    display: inline-block;
    transform: scaleX(-1);
}

.pt-swal-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #8E879F;
}
