/* Shared SweetAlert2 confirmation dialog skin (admin + frontend) */

@keyframes swalCatIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes swalCatOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.94) translateY(8px); }
}

.swal-cat-show { animation: swalCatIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.swal-cat-hide { animation: swalCatOut 0.2s ease-in both; }

.swal-cat-popup {
    border-radius: 1.75rem !important;
    padding: 0 !important;
    box-shadow: 0 32px 64px -16px rgb(15 23 42 / 0.26),
                0 0 0 1px rgb(226 232 240 / 0.8) !important;
    font-family: inherit !important;
    width: 26rem !important;
    max-width: 92vw !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.swal-cat-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 1.5rem 1.5rem 0.35rem !important;
    margin: 0 !important;
    text-align: center !important;
    letter-spacing: -0.01em !important;
    line-height: 1.35 !important;
}

/* Plain text / icon confirms (SweetAlert default nodes) */
.swal-cat-html {
    margin: 0 !important;
    padding: 0.35rem 1.5rem 1.35rem !important;
    text-align: center !important;
    color: #475569 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
}

.swal-cat-html:empty {
    display: none !important;
    padding: 0 !important;
}

.swal-cat-popup .swal2-icon {
    margin: 1.35rem auto 0.15rem !important;
    border-width: 0.2em !important;
}

.swal-cat-popup .swal2-icon.swal2-question {
    border-color: rgb(99 102 241 / 0.35) !important;
    color: #4f46e5 !important;
}

.swal-cat-popup .swal2-icon.swal2-warning {
    border-color: rgb(245 158 11 / 0.4) !important;
    color: #d97706 !important;
}

.swal-cat-popup .swal2-icon.swal2-info {
    border-color: rgb(14 165 233 / 0.4) !important;
    color: #0284c7 !important;
}

.swal-cat-popup .swal2-icon.swal2-success {
    border-color: rgb(16 185 129 / 0.4) !important;
    color: #059669 !important;
}

.swal-cat-popup .swal2-icon.swal2-error {
    border-color: rgb(244 63 94 / 0.4) !important;
    color: #e11d48 !important;
}

/* When custom HTML body is used, drop default html padding — body handles it */
.swal-cat-html:has(.swal-cat-body) {
    padding: 0 !important;
    text-align: left !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Centered moderation / reject dialogs (icon + copy aligned as one composition) */
.swal-cat-popup--centered .swal-cat-title {
    text-align: center !important;
    padding: 1.35rem 1.5rem 0 !important;
}

.swal-cat-popup--centered .swal-cat-html {
    text-align: center !important;
    padding: 0 !important;
}

.swal-cat-popup--centered .swal-cat-body {
    padding: 0.55rem 1.5rem 1.25rem;
    gap: 0.85rem;
}

.swal-cat-popup--centered .swal-cat-icon-wrap {
    padding-bottom: 0;
}

.swal-cat-popup--centered .swal-cat-message {
    font-size: 0.9rem;
    color: #475569;
    padding: 0 0.25rem;
}

.swal-cat-popup--centered .swal-cat-actions {
    justify-content: stretch !important;
}

.swal-cat-popup--centered .swal-cat-cancel-btn,
.swal-cat-popup--centered .swal-cat-confirm-btn {
    flex: 1 1 0 !important;
}

.swal-cat-body {
    padding: 0.75rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.swal-cat-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.25rem;
}

.swal-cat-icon-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1.5px solid #c7d2fe;
    color: #4f46e5;
    box-shadow: 0 6px 20px -6px rgb(79 70 229 / 0.28);
}

.swal-cat-icon-ring--danger {
    background: linear-gradient(135deg, #fef2f2 0%, #ffe4e6 100%);
    border-color: #fecdd3;
    color: #f43f5e;
    box-shadow: 0 6px 20px -6px rgb(244 63 94 / 0.3);
}

.swal-cat-icon-ring--warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
    color: #d97706;
    box-shadow: 0 6px 20px -6px rgb(245 158 11 / 0.28);
}

.swal-cat-message {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
    line-height: 1.55;
    text-align: center;
    font-weight: 500;
}

.swal-cat-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: center;
    max-width: 100%;
    padding: 0.45rem 0.9rem;
    border-radius: 99px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.04);
}

.swal-cat-name-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.swal-cat-name-chip svg { color: var(--theme-primary, #4f46e5); flex-shrink: 0; }

.swal-cat-warning {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    padding: 0.65rem 0.85rem;
    background: #fff7f7;
    border-radius: 0.75rem;
    border: 1px solid #fee2e2;
    text-align: center;
}

.swal-cat-warning strong { color: #f43f5e; font-weight: 700; }

.swal-cat-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
    margin: 0 !important;
    padding: 1rem 1.5rem !important;
    border-top: 1px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #f8fafc !important;
}

.swal-cat-confirm-btn,
.swal-cat-cancel-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
}

.swal-cat-confirm-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
    border-radius: 0.8rem !important;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    letter-spacing: 0.01em !important;
    transition: opacity 0.15s, box-shadow 0.15s, transform 0.12s !important;
    box-shadow: 0 4px 16px -4px rgb(244 63 94 / 0.55) !important;
}

.swal-cat-confirm-btn:hover { opacity: 0.92 !important; box-shadow: 0 6px 20px -4px rgb(244 63 94 / 0.6) !important; transform: translateY(-1px) !important; }
.swal-cat-confirm-btn:active { transform: translateY(0) !important; opacity: 1 !important; }
.swal-cat-confirm-btn:focus-visible { outline: none !important; box-shadow: 0 0 0 3px rgb(244 63 94 / 0.35) !important; }

.swal-cat-cancel-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
    border-radius: 0.8rem !important;
    background: #fff !important;
    color: #475569 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border: 1.5px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s !important;
}

.swal-cat-cancel-btn:hover { background: #f8fafc !important; border-color: #cbd5e1 !important; color: #0f172a !important; transform: translateY(-1px) !important; }
.swal-cat-cancel-btn:active { transform: translateY(0) !important; }
.swal-cat-cancel-btn:focus-visible { outline: none !important; box-shadow: 0 0 0 3px rgb(100 116 139 / 0.25) !important; }

.dark .swal-cat-popup {
    background: #1e293b !important;
    box-shadow: 0 32px 64px -16px rgb(0 0 0 / 0.55),
                0 0 0 1px rgb(51 65 85 / 0.8) !important;
}

.dark .swal-cat-title { color: #f8fafc !important; }
.dark .swal-cat-html { color: #cbd5e1 !important; }
.dark .swal-cat-message { color: #cbd5e1; }
.dark .swal-cat-popup--centered .swal-cat-message { color: #e2e8f0; }
.dark .swal-cat-name-chip { background: #0f172a; border-color: #334155; color: #f1f5f9; }
.dark .swal-cat-warning { color: #94a3b8; background: #450a0a; border-color: #991b1b; }
.dark .swal-cat-icon-ring {
    background: linear-gradient(135deg, rgb(49 46 129 / 0.45) 0%, rgb(67 56 202 / 0.28) 100%);
    border-color: rgb(165 180 252 / 0.35);
    color: #a5b4fc;
    box-shadow: 0 6px 20px -6px rgb(79 70 229 / 0.25);
}
.dark .swal-cat-icon-ring--danger {
    background: linear-gradient(135deg, rgb(136 19 55 / 0.35) 0%, rgb(159 18 57 / 0.22) 100%);
    border-color: rgb(251 113 133 / 0.35);
    color: #fda4af;
    box-shadow: 0 6px 20px -6px rgb(244 63 94 / 0.25);
}
.dark .swal-cat-actions { border-color: #334155 !important; background: #0f172a !important; }
.dark .swal-cat-cancel-btn { background: #1e293b !important; color: #e2e8f0 !important; border-color: #475569 !important; }
.dark .swal-cat-cancel-btn:hover { background: #0f172a !important; border-color: #64748b !important; color: #f8fafc !important; }
.dark .swal-cat-confirm-btn {
    box-shadow: 0 4px 14px -4px rgb(244 63 94 / 0.4) !important;
}
.dark .swal-cat-confirm-btn:hover {
    box-shadow: 0 6px 18px -4px rgb(244 63 94 / 0.48) !important;
}
.dark .swal-cat-popup .swal2-icon.swal2-question {
    border-color: rgb(165 180 252 / 0.45) !important;
    color: #a5b4fc !important;
}

@media (max-width: 640px) {
    .swal-cat-popup { width: 92vw !important; }
    .swal-cat-title { padding: 1.25rem 1.25rem 0.25rem !important; }
    .swal-cat-html { padding: 0.25rem 1.25rem 1.15rem !important; }
    .swal-cat-popup--centered .swal-cat-title { padding: 1.15rem 1.25rem 0 !important; }
    .swal-cat-popup--centered .swal-cat-body,
    .swal-cat-body { padding: 0.65rem 1.25rem 1.1rem; }
    .swal-cat-actions { flex-direction: column-reverse !important; padding: 0.85rem 1.25rem !important; }
    .swal-cat-confirm-btn,
    .swal-cat-cancel-btn { width: 100% !important; justify-content: center !important; }
}
