/* ============================================================
   MedFortress — Custom styles (supplements Tailwind CDN)
   Brand: VulpineMSP | "Smart IT. Silent Security."
   ============================================================ */

/* ── Accessibility: visually hidden but screen-reader accessible ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Smooth scrolling ── */
html {
  scroll-behavior: smooth;
}

/* ── Reusable form input style (applied via class="form-input") ── */
.form-input {
  display: block;
  width: 100%;
  border: 1px solid #cbd5e1; /* slate-300 */
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #1e293b; /* slate-800 */
  font-size: 1rem;
  line-height: 1.5;
  min-height: 44px; /* REQ-12: minimum touch target */
  transition: border-color 0.15s, box-shadow 0.15s;
  background-color: #fff;
}

.form-input:focus {
  outline: none;
  border-color: #0d9488; /* teal-600 */
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.form-input.error {
  border-color: #ef4444; /* red-500 */
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input::placeholder {
  color: #94a3b8; /* slate-400 */
}

/* ── Loading spinner for submit buttons ── */
.btn-loading {
  position: relative;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Score reveal animation (REQ-14 nice-to-have) ── */
@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#score-display {
  animation: count-up 0.4s ease-out;
}

/* ── Focus-visible ring for keyboard nav ── */
:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* ── Anchor offset for sticky header ── */
[id] {
  scroll-margin-top: 60px;
}
