/* Shared accessibility/base tokens for all three PorteroQR frontends. Linked
   before each surface's own stylesheet, so surface rules can still override. */

/* Visible keyboard focus (>= 3:1 non-text contrast against light backgrounds). */
:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Minimum interactive target size (WCAG 2.5.8); bump to 44px on touch. */
button,
.btn,
[role="button"] {
  min-height: 24px;
}
@media (pointer: coarse) {
  button,
  .btn,
  [role="button"] {
    min-height: 44px;
  }
}

/* Honor reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Screen-reader-only utility. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Field/error/status primitives produced by shared/a11y.js. */
.field {
  margin-bottom: 12px;
}
.field > label {
  display: block;
  font-size: 0.85rem;
  color: #334155;
  margin: 0 0 4px;
}
.field .hint {
  font-size: 0.8rem;
  color: #475569; /* ~7:1 on white */
  margin: 4px 0 0;
}
.field-err {
  color: #b91c1c; /* >= 4.5:1 on white */
  font-size: 0.85rem;
  margin: 4px 0 0;
}
.live-status {
  font-size: 0.9rem;
  margin: 8px 0 0;
}
.live-status.ok {
  color: #15803d;
}
.live-status.err {
  color: #b91c1c;
}

/* In-page modal (shared/confirmDialog.js). */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}
.modal {
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.modal h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.btn.danger-btn {
  background: #dc2626;
  color: #fff;
}
