/* Mobile-first, high-contrast, WCAG 2.1 AA accessible stylesheet for Vendor Intake */
:root {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #334155;
  --primary: #0369a1;
  --primary-hover: #075985;
  --primary-focus: #0284c7;
  --border: #cbd5e1;
  --border-focus: #0284c7;
  --success-bg: #ecfdf5;
  --success-border: #059669;
  --success-text: #064e3b;
  --danger-bg: #fef2f2;
  --danger-border: #dc2626;
  --danger-text: #7f1d1d;
  --warning-bg: #fffbeb;
  --warning-border: #d97706;
  --warning-text: #78350f;
  --radius: 8px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  padding: 16px;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  font-weight: bold;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus {
  top: 16px;
}

.container {
  max-width: 540px;
  margin: 0 auto;
}

/* Header & Brand */
.portal-header {
  text-align: center;
  margin-bottom: 24px;
  padding-top: 8px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-color: #0284c7;
  color: #ffffff;
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 12px;
  border: 2px solid #0369a1;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Cards & Sections */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main);
}

.helper-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.required-mark {
  color: var(--danger-border);
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background-color: #ffffff;
  color: var(--text-main);
  min-height: 48px; /* Large touch target */
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Radio Group */
.radio-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: #ffffff;
  min-height: 48px;
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px; /* Large touch target */
  padding: 12px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease-in-out;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-main);
  border: 1.5px solid var(--border);
  margin-top: 10px;
}
.btn-secondary:hover {
  background-color: #e2e8f0;
}

/* File Upload & Privacy Box */
.upload-box {
  background: #f8fafc;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.file-input {
  width: 100%;
  padding: 8px 0;
  font-size: 0.95rem;
}

.privacy-disclosure {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--primary);
}

.disclosure-details {
  margin-top: 8px;
  padding: 8px;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Alerts and Messages */
.alert {
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 500;
}

.alert-danger {
  background-color: var(--danger-bg);
  border: 1.5px solid var(--danger-border);
  color: var(--danger-text);
}

.alert-success {
  background-color: var(--success-bg);
  border: 1.5px solid var(--success-border);
  color: var(--success-text);
}

.alert-warning {
  background-color: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  color: var(--warning-text);
}

/* Reference confirmation box */
.reference-card {
  text-align: center;
  padding: 24px;
  border: 2px solid var(--success-border);
  background: var(--success-bg);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.reference-number {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--success-text);
  margin: 12px 0;
  user-select: all;
}

/* Matched Job Banner */
.matched-banner {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.matched-banner strong {
  display: block;
  color: #166534;
  font-size: 1rem;
}

/* 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;
}

.hidden {
  display: none !important;
}

.fieldset-clean {
  border: none;
  padding: 0;
}

.legend-bold {
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-label {
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.reference-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: 600;
}

.reference-subtext {
  font-size: 0.85rem;
  color: var(--success-text);
}
