/* =========================================================
   HireSpec — smoke.css
   Minimal, additive styles for the smoke-test harness.
   These rules only *enhance* existing components and never
   override the base design system in styles.css.
   ========================================================= */

/* Newsletter success message — mirrors .newsletter-error */
.newsletter-success {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #16a34a;
  font-weight: 500;
}

[data-theme="dark"] .newsletter-success {
  color: #4ade80;
}

/* Field error visibility — main.js toggles .is-visible */
.field-error.is-visible {
  display: block;
}

/* Contact form success state inside the profile modal */
.pm-contact-success,
.form-success {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  font-size: 0.9rem;
  font-weight: 500;
}

[data-theme="dark"] .pm-contact-success,
[data-theme="dark"] .form-success {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

/* Invalid inputs — subtle, non-intrusive */
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #ef4444 !important;
  outline-color: #ef4444;
}

/* Reduced motion — no transitions on smoke-only elements */
@media (prefers-reduced-motion: reduce) {
  .newsletter-success,
  .pm-contact-success,
  .form-success {
    transition: none !important;
  }
}

/* =========================================================
   Accessibility pass — additive styles only.
   These rules never override the base design system in
   styles.css; they only fill gaps for keyboard users and
   screen readers.
   ========================================================= */

/* Empty-state fallback (rendered by js/a11y-audit.js only
   when main.js did not render one). */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  border-radius: 16px;
  background: rgba(79, 70, 229, 0.04);
  border: 1px dashed rgba(79, 70, 229, 0.25);
}

[data-theme="dark"] .empty-state {
  background: rgba(129, 140, 248, 0.06);
  border-color: rgba(129, 140, 248, 0.3);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--text-soft, #64748b);
  font-size: 0.95rem;
}

.empty-state .btn {
  margin-top: 4px;
}

/* Focus visibility — ensure keyboard focus is always visible
   on interactive elements, even when the base CSS uses
   outline: none. */
:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  border-radius: 6px;
}

[data-theme="dark"] :focus-visible {
  outline-color: #818cf8;
}

/* Skip link — visible when focused (fallback for resets). */
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 10px 16px;
  background: #4f46e5;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Modal card — ensure it can receive focus programmatically
   without showing a visible outline (it is a container, not
   an interactive control). */
.modal-card:focus {
  outline: none;
}

/* Reduced motion — no smooth scrolling, no transitions. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
