/*
| WaselBot Design System — Dialogs (brand: navy #1e3a8a + red #DC2626→#B91C1C, same as the sidebar headers)
| One look for every popup in the panel and the public pages:
|   - WBDialog.confirm / WBDialog.alert (assets/js/wb-dialogs.js) for new code; never use the browser's confirm()/alert()
|   - the same skin applied to SweetAlert (swal), Alertify and Bootstrap modals that the panel already uses
| Tokens below are the single source of truth; change them here only.
*/
:root {
  --wb-navy: #172e6e;
  --wb-navy-2: #1e3a8a;
  --wb-accent: #b91c1c;
  --wb-accent-2: #dc2626;
  --wb-accent-soft: #fdecec;
  --wb-ink: #1e2d4f;
  --wb-muted: #6b7280;
  --wb-line: #e8edf5;
  --wb-danger: #dc2626;
  --wb-success: #10b981;
  --wb-info: #1a56db;
  --wb-radius: 24px;
  --wb-shadow: 0 40px 90px -30px rgba(23, 46, 110, .55), 0 12px 30px -18px rgba(23, 46, 110, .35);
  --wb-backdrop: rgba(10, 18, 44, .55);
}

/* ------------------------------------------------------------------ WBDialog component */
.wbd-overlay { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--wb-backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s ease; }
.wbd-overlay.wbd-in { opacity: 1; }
.wbd { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: var(--wb-radius); box-shadow: var(--wb-shadow); overflow: hidden; color: var(--wb-ink); text-align: center; transform: translateY(14px) scale(.96); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); font-family: inherit; }
.wbd-overlay.wbd-in .wbd { transform: none; }
.wbd:before { content: ""; position: absolute; top: 0; left: 50%; width: 72px; height: 4px; margin-left: -36px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--wb-accent-2), var(--wb-accent)); }
.wbd-body { padding: 34px 30px 8px; }
.wbd-icon { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--wb-accent-soft); color: #b91c1c; box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .35); }
.wbd-icon svg { width: 30px; height: 30px; }
.wbd--danger .wbd-icon { background: #fdecec; color: var(--wb-danger); box-shadow: inset 0 0 0 1px rgba(214, 69, 69, .25); }
.wbd--success .wbd-icon { background: #e3f6ec; color: var(--wb-success); box-shadow: inset 0 0 0 1px rgba(19, 131, 75, .25); }
.wbd--info .wbd-icon { background: #e8efff; color: var(--wb-info); box-shadow: inset 0 0 0 1px rgba(35, 70, 184, .2); }
.wbd-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; line-height: 1.5; color: var(--wb-ink); }
.wbd-text { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--wb-muted); white-space: pre-line; word-break: break-word; }
.wbd-input { display: block; width: 100%; margin-top: 14px; padding: 11px 14px; font: inherit; font-size: 15px; color: inherit; background: #fff; border: 1.5px solid #dbe2ef; border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.wbd-input:focus { border-color: #1e3a8a; box-shadow: 0 0 0 4px rgba(30, 58, 138, .12); }
.wbd-actions { display: flex; gap: 10px; padding: 24px 30px 28px; }
.wbd-btn { flex: 1; min-height: 46px; border: 0; border-radius: 14px; font-weight: 800; font-size: 15px; cursor: pointer; transition: transform .12s, box-shadow .12s, filter .12s; font-family: inherit; }
.wbd-btn:active { transform: scale(.98); }
.wbd-btn:focus { outline: none; }
.wbd-btn:focus-visible, .wbd-btn:focus { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(220, 38, 38, .6); }
.wbd-btn--ghost:focus { box-shadow: inset 0 0 0 1px var(--wb-navy-2), 0 0 0 3px rgba(220, 38, 38, .45); }
.wbd-btn--primary { background: linear-gradient(135deg, var(--wb-accent-2), var(--wb-accent)); color: #ffffff; box-shadow: 0 12px 24px -12px rgba(220, 38, 38, .95); }
.wbd-btn--primary:hover { filter: brightness(1.05); }
.wbd--danger .wbd-btn--primary { background: linear-gradient(135deg, #e25b5b, var(--wb-danger)); color: #fff; box-shadow: 0 12px 24px -12px rgba(214, 69, 69, .9); }
.wbd-btn--ghost { background: #fff; color: var(--wb-ink); box-shadow: inset 0 0 0 1px var(--wb-line); }
.wbd-btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--wb-navy-2); color: var(--wb-navy-2); }
.wbd-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: #a3a9bf; font-size: 20px; line-height: 1; cursor: pointer; }
.wbd-close:hover { background: #f3f4f9; color: var(--wb-ink); }
body.wbd-open { overflow: hidden; }
@media (max-width: 480px) {
  .wbd-overlay { align-items: flex-end; padding: 0; }
  .wbd { max-width: none; border-radius: var(--wb-radius) var(--wb-radius) 0 0; transform: translateY(40px); }
  .wbd-actions { flex-direction: column-reverse; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .wbd-overlay, .wbd { transition: none; } }

/* ------------------------------------------------------------------ SweetAlert skin (used ~1200 times in the panel) */
.swal-overlay { background-color: var(--wb-backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.swal-modal { position: relative; width: 440px; max-width: calc(100% - 32px); border-radius: var(--wb-radius); box-shadow: var(--wb-shadow); padding: 30px 6px 6px; overflow: hidden; }
.swal-modal:before { content: ""; position: absolute; top: 0; left: 50%; width: 72px; height: 4px; margin-left: -36px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--wb-accent-2), var(--wb-accent)); }
.swal-title { font-weight: 800 !important; font-size: 20px; color: var(--wb-ink); padding: 6px 22px 0; line-height: 1.5; }
.swal-title:not(:last-child) { margin-bottom: 8px; }
.swal-text { font-weight: 400 !important; font-size: 14.5px; color: var(--wb-muted); line-height: 1.9; text-align: center; padding: 0 22px; max-width: 100%; }
.swal-content { padding: 0 22px; }
.swal-footer { text-align: center; padding: 22px 22px 22px; margin-top: 10px; border: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.swal-button-container { margin: 0; flex: 1 1 140px; }
.swal-button { width: 100%; min-height: 46px; border-radius: 14px; font-weight: 800; font-size: 15px; padding: 0 20px; background: linear-gradient(135deg, var(--wb-accent-2), var(--wb-accent)); color: #ffffff; box-shadow: 0 12px 24px -12px rgba(220, 38, 38, .95); transition: filter .12s, transform .12s; }
.swal-button:not([disabled]):hover { background: linear-gradient(135deg, var(--wb-accent-2), var(--wb-accent)); filter: brightness(1.05); }
.swal-button:active { transform: scale(.98); background: linear-gradient(135deg, var(--wb-accent-2), var(--wb-accent)); }
.swal-button:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .45); }
.swal-button--cancel, .swal-button--cancel:not([disabled]):hover, .swal-button--cancel:active { background: #fff; color: var(--wb-ink); box-shadow: inset 0 0 0 1px var(--wb-line); }
.swal-button--cancel:focus { box-shadow: inset 0 0 0 1px var(--wb-navy-2), 0 0 0 3px rgba(30, 58, 138, .15); }
.swal-button--danger, .swal-button--danger:not([disabled]):hover, .swal-button--danger:active { background: linear-gradient(135deg, #e25b5b, var(--wb-danger)); color: #fff; box-shadow: 0 12px 24px -12px rgba(214, 69, 69, .9); }
.swal-icon { margin-top: 4px; transform: scale(.82); }
.swal-icon--warning { border-color: #f59e0b; }
.swal-icon--warning__body, .swal-icon--warning__dot { background-color: #f59e0b; }
.swal-icon--info { border-color: var(--wb-info); }
.swal-icon--info:before, .swal-icon--info:after { background-color: var(--wb-info); }
.swal-icon--success { border-color: rgba(19, 131, 75, .35); }
.swal-icon--success__ring { border-color: rgba(19, 131, 75, .25); }
.swal-icon--success__line { background-color: var(--wb-success); }
.swal-icon--error { border-color: var(--wb-danger); }
.swal-icon--error__line { background-color: var(--wb-danger); }
.swal-content__input, .swal-content__textarea { border-radius: 12px; border-color: var(--wb-line); }
@media (max-width: 480px) { .swal-footer { flex-direction: column-reverse; } .swal-button-container { flex-basis: auto; } }

/* ------------------------------------------------------------------ Alertify skin */
.alertify .ajs-dimmer { background-color: var(--wb-backdrop); opacity: 1; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.alertify .ajs-modal .ajs-dialog { border-radius: var(--wb-radius); box-shadow: var(--wb-shadow); overflow: hidden; max-width: calc(100% - 32px); }
.alertify .ajs-header { background: #fff; border-bottom: 1px solid var(--wb-line); font-weight: 800; color: var(--wb-ink); padding: 18px 24px; }
.alertify .ajs-body { color: var(--wb-muted); line-height: 1.9; }
.alertify .ajs-footer { background: #fff; border-top: 0; padding: 10px 18px 18px; }
.alertify .ajs-footer .ajs-buttons .ajs-button { min-height: 42px; min-width: 96px; border-radius: 12px; font-weight: 800; border: 0; }
.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok { background: linear-gradient(135deg, var(--wb-accent-2), var(--wb-accent)); color: #ffffff; }
.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-cancel { background: #fff; color: var(--wb-ink); box-shadow: inset 0 0 0 1px var(--wb-line); }

/* ------------------------------------------------------------------ Bootstrap modal skin (frame only; content layouts stay as they are) */
.modal-backdrop.show { background-color: #0a122c; opacity: .55; }
.modal-content { border-radius: 20px; }
.modal-content > .modal-header:first-child { border-top-left-radius: 20px; border-top-right-radius: 20px; }
.modal-content > .modal-footer:last-child { border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; }
.modal.show .modal-content { box-shadow: var(--wb-shadow); }
.modal-header .close { border-radius: 10px; opacity: .6; transition: opacity .12s, background .12s; }
.modal-header .close:hover { opacity: 1; }
