/* Standalone styling for confirm-modal.js (loaded globally in base.html).
 *
 * The modal markup was originally written against orgx.css (`.orgx-overlay`,
 * `.orgx-modal`, `.ox-btn*`, `.card-head`), but orgx.css only loads on the
 * organizations / regulations pages — so on every other page (e.g. the Fix
 * Amendments screen) the dialog rendered as an unstyled block at the bottom
 * of the document. These rules make it self-sufficient using the global
 * ir-tokens.css palette, so it follows the light/dark theme for free.
 *
 * Specificity is deliberately kept to single-class selectors: orgx.css is
 * loaded LATER in the document on orgx pages, so its equal-specificity rules
 * still win there and those pages keep their own dark modal treatment.
 */

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  animation: confirm-modal-fade 0.16s ease;

  /* orgx aliases used by inline styles inside the markup */
  --tx-hi: var(--ink-0);
  --tx-mid: var(--ink-1);
  --tx-lo: var(--ink-2);
}
@keyframes confirm-modal-fade { from { opacity: 0; } to { opacity: 1; } }

.confirm-modal-panel {
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  text-align: left;
  background: var(--surf-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 16px);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.45);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-1);
  animation: confirm-modal-in 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes confirm-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.confirm-modal-panel .card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.confirm-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-0);
  letter-spacing: -0.01em;
}
.confirm-modal-icon { color: var(--warn); flex-shrink: 0; }

.confirm-modal-panel .ox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm, 8px);
  background: var(--surf-2);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.confirm-modal-panel .ox-btn:hover { background: var(--surf-3); }
.confirm-modal-panel .ox-btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.confirm-modal-panel .ox-btn-quiet:hover { background: var(--surf-2); color: var(--ink-0); }
.confirm-modal-panel .ox-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.confirm-modal-panel .ox-btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.confirm-modal-panel .ox-btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.confirm-modal-panel .ox-btn-danger:hover { filter: brightness(1.08); }
.confirm-modal-panel .ox-btn-icon { width: 30px; height: 30px; padding: 0; }
.confirm-modal-panel .ox-btn-sm { height: 30px; font-size: 12.5px; }

.confirm-modal-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm, 8px);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 13.5px;
}
.confirm-modal-input:focus { outline: none; border-color: var(--accent); }
