/* Base custom styles — Tailwind CDN handles utilities */

/* Minimum touch target for choice buttons */
.choice-btn {
  min-height: 44px;
  touch-action: manipulation;
}

/* Selected state */
.choice-btn.selected {
  border-color: #2563eb !important;
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

/* Risk severity button selected states */
.risk-btn[data-severity="low"].selected {
  background-color: #fef9c3;
  border-color: #ca8a04;
  box-shadow: 0 0 0 2px #ca8a04;
}
.risk-btn[data-severity="medium"].selected {
  background-color: #ffedd5;
  border-color: #ea580c;
  box-shadow: 0 0 0 2px #ea580c;
}
.risk-btn[data-severity="high"].selected {
  background-color: #fee2e2;
  border-color: #dc2626;
  box-shadow: 0 0 0 2px #dc2626;
}

/* Smooth conditional reveal */
.question-block {
  transition: opacity 0.2s ease;
}

/* ------------------------------------------------------------------------
   Management record pages (void_management / compliance_management)
   In-place htmx updates — see app/static/js/record-async.js.
   Plain CSS rather than Tailwind utilities so these states don't depend on
   the committed tailwind.css being rebuilt.
   ------------------------------------------------------------------------ */

/* In-flight control: dim it and block a second click while the POST runs, so
   a double-tap can't fire the same toggle twice. */
.htmx-request,
.htmx-request button[type="submit"] {
  opacity: 0.55;
  pointer-events: none;
}

/* Inline failure message, inserted directly after the form that failed. */
.record-async-error {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 0.375rem 0.5rem;
}

/* Transient "Saved" confirmation — without a page reload there is otherwise
   no sign that a Save button did anything. */
.record-async-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  background-color: #111827;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.record-async-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
