/* Jaayton Wells - WCAG 2.1 AA compliant styles */
:root {
  --nwc-primary: #0a4d8c;
  --nwc-primary-dark: #073a6b;
  --nwc-accent: #1c7ed6;
  --nwc-text: #1e293b;
  --nwc-muted: #64748b;
  --nwc-border: #e2e8f0;
  --nwc-bg: #f8fafc;
}

* {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* WCAG: skip-to-content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--nwc-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffd60a;
  outline-offset: 2px;
}

/* WCAG: visible focus indicators on all interactive elements */
.focus-ring:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #ffb703;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nwc-primary);
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid var(--nwc-primary);
  transition: background 0.15s, transform 0.05s;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: var(--nwc-primary-dark); border-color: var(--nwc-primary-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--nwc-text);
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid var(--nwc-border);
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover { background: #f1f5f9; }

/* Navigation */
.nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  color: #334155;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.nav-link:hover { background: #f1f5f9; color: var(--nwc-primary); }

/* Forms (WCAG: clear labels, visible borders, ≥4.5:1 contrast) */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}
.form-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  background: #fff;
  color: var(--nwc-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: var(--nwc-accent);
  box-shadow: 0 0 0 3px rgba(28, 126, 214, 0.18);
  outline: none;
}
.form-input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Cards */
.card-stat {
  background: #fff;
  border: 1px solid var(--nwc-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--nwc-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 77, 140, 0.08);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--nwc-border);
  padding: 0.625rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--nwc-text);
}
.badge-pill i { color: var(--nwc-primary); }

/* Job listings */
.job-card {
  background: #fff;
  border: 1px solid var(--nwc-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.job-card:hover {
  border-color: var(--nwc-accent);
  box-shadow: 0 4px 12px rgba(10, 77, 140, 0.08);
}
.job-card.premium {
  border-left: 4px solid #f59e0b;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: #f1f5f9;
  color: #334155;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.tag-premium { background: #fef3c7; color: #92400e; }
.tag-remote { background: #dcfce7; color: #166534; }
.tag-hybrid { background: #dbeafe; color: #1e40af; }
.tag-onsite { background: #f1f5f9; color: #334155; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-submitted { background: #f1f5f9; color: #334155; }
.status-reviewed { background: #dbeafe; color: #1e40af; }
.status-shortlisted { background: #ede9fe; color: #5b21b6; }
.status-interview { background: #fef3c7; color: #92400e; }
.status-offered { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-active { background: #dcfce7; color: #166534; }
.status-suspended { background: #fee2e2; color: #991b1b; }
.status-paused { background: #fef3c7; color: #92400e; }
.status-closed { background: #f1f5f9; color: #334155; }
.status-draft { background: #f1f5f9; color: #334155; }

/* Role selector cards */
.role-option { display: block; cursor: pointer; }
.role-card {
  display: block;
  text-align: center;
  padding: 1rem;
  border: 2px solid var(--nwc-border);
  border-radius: 0.625rem;
  font-weight: 600;
  color: var(--nwc-text);
  transition: all 0.15s;
}
.role-card i { font-size: 1.25rem; color: var(--nwc-primary); }
.role-option input:checked + .role-card {
  border-color: var(--nwc-primary);
  background: #eff6ff;
  color: var(--nwc-primary);
}
.role-option input:focus-visible + .role-card {
  outline: 3px solid #ffb703;
  outline-offset: 2px;
}

/* Prose */
.prose-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.prose-content p { line-height: 1.65; margin-bottom: 0.75rem; color: #334155; }
.prose-content ul { list-style: disc; padding-left: 1.5rem; line-height: 1.7; color: #334155; }
.prose-content ul li { margin-bottom: 0.25rem; }

/* Screen-reader-only */
.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;
}

/* Tabs */
.tab-btn {
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tab-btn:hover { color: var(--nwc-primary); background: #f8fafc; }
.tab-active { color: var(--nwc-primary); border-bottom-color: var(--nwc-primary); }
.tab-btn:focus-visible { outline: 3px solid #ffb703; outline-offset: -3px; }

/* Notifications */
.notif-wrap { position: relative; }
.notif-btn {
  position: relative;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #334155;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s;
}
.notif-btn:hover { background: #f1f5f9; }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid var(--nwc-border);
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 50;
  max-height: 480px;
  overflow-y: auto;
}
.notif-item {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  display: block;
  color: var(--nwc-text);
  text-decoration: none;
  transition: background 0.15s;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eff6ff; }
.notif-item .n-title { font-weight: 600; font-size: 0.9rem; }
.notif-item .n-body { font-size: 0.825rem; color: #475569; margin-top: 2px; }
.notif-item .n-time { font-size: 0.7rem; color: #94a3b8; margin-top: 4px; }

/* Company card */
.company-card {
  background: #fff;
  border: 1px solid var(--nwc-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: block;
  color: var(--nwc-text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.company-card:hover {
  border-color: var(--nwc-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 77, 140, 0.08);
}

/* Save button */
.save-btn {
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--nwc-border);
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.875rem;
  font-weight: 600;
}
.save-btn:hover { border-color: var(--nwc-accent); color: var(--nwc-primary); }
.save-btn.saved {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast */
@media (prefers-contrast: more) {
  .form-input { border-color: #000; }
  .btn-primary { border-color: #000; }
}
