/* ===== confirm_dialog_html (HTML form, scoped) =====
   Loaded eagerly from anvil.yaml native_deps.head_html. Anvil's server strips a
   <style> block out of an HTML template, so the form's rules live here.

   ROOT RULE, and it keeps `position: fixed` - a deliberate deviation.
   The foundation bans a fixed root because a screen root is a flex item in the
   shared layout's scroller and fixed positioning stops the port scrolling. This
   root is not a screen: it is a modal overlay mounted per click into a panel,
   and it deliberately takes the viewport. Removing `position: fixed` deletes
   the modal. The root rule stays a bare class so it outranks the scoped reset;
   it takes no `position: relative`, no `flex`, no `min-height`.

   SCOPING. Every other rule is :where(.tab-confirm-overlay)-prefixed, which adds
   zero specificity, so no rule can change which declaration wins. The
   [data-has-count="false"] rule keeps its (0,2,0) weight; its subject's ancestor
   is .tab-confirm-modal, not the root, so it loses no class under :where().

   TIES AUDITED, none live. `tab-confirm-*` appears in no other template in this
   app (grepped across all 17), the dependency's runtime injection only declares
   .px-* classes, theme.css styles `button` only through `button.close` and the
   .anvil-role-*-button families, and no ancestor form (training_authoring,
   test_detail_html, edit_tab_html, t_px_tests_html) declares a descendant rule
   with a bare element subject that reaches inside this dialog. So a head
   <link> position decides no tie.

   KEYFRAMES. tab-confirm-fade and tab-confirm-pop are form-prefixed and unique
   inside this section. */

.tab-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: tab-confirm-fade 120ms ease-out;
}
@keyframes tab-confirm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
:where(.tab-confirm-overlay) .tab-confirm-modal {
  background: #ffffff;
  border-radius: 12px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: tab-confirm-pop 140ms ease-out;
}
@keyframes tab-confirm-pop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
:where(.tab-confirm-overlay) .tab-confirm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
:where(.tab-confirm-overlay) .tab-confirm-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-danger  .tab-confirm-icon { background: #fef2f2; color: #b91c1c; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-warning .tab-confirm-icon { background: #fffbeb; color: #b45309; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-info    .tab-confirm-icon { background: #eff6ff; color: #1d4ed8; }

:where(.tab-confirm-overlay) .tab-confirm-body {
  font-size: 15px;
  line-height: 1.55;
  color: #0f172a;
}
:where(.tab-confirm-overlay) .tab-confirm-body strong { font-weight: 700; }
/* #tab-confirm-desc is always hidden - applyState does not touch the node -
   so this is its single rendered state, on the designer canvas too, and this
   section needs no live-class gate. */
:where(.tab-confirm-overlay) .tab-confirm-desc {
  display: none;
}
:where(.tab-confirm-overlay) .tab-confirm-count-line {
  margin-top: 8px;
  color: #334155;
  font-size: 14px;
}
:where(.tab-confirm-overlay) .tab-confirm-count-line .tab-confirm-count {
  font-weight: 700;
  color: #0f172a;
}
:where(.tab-confirm-overlay) .tab-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
:where(.tab-confirm-overlay) .tab-confirm-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  min-height: 36px;
  border: 1px solid transparent;
}
:where(.tab-confirm-overlay) .tab-confirm-btn-cancel {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
:where(.tab-confirm-overlay) .tab-confirm-btn-cancel:hover { background: #e2e8f0; }
:where(.tab-confirm-overlay) .tab-confirm-btn-primary {
  color: #ffffff;
  border-color: transparent;
}
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-danger  .tab-confirm-btn-primary { background: #dc2626; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-danger  .tab-confirm-btn-primary:hover { background: #b91c1c; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-warning .tab-confirm-btn-primary { background: #d97706; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-warning .tab-confirm-btn-primary:hover { background: #b45309; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-info    .tab-confirm-btn-primary { background: #2563eb; }
:where(.tab-confirm-overlay) .tab-confirm-modal.kind-info    .tab-confirm-btn-primary:hover { background: #1d4ed8; }
:where(.tab-confirm-overlay) .tab-confirm-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
:where(.tab-confirm-overlay) [data-has-count="false"] .tab-confirm-count-line { display: none; }
