/* ==========================================================================
   SocioDigitals — Careers & application flow
   Builds on the tokens defined in styles.css, so it inherits light/dark theme.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Job listing bits
   -------------------------------------------------------------------------- */
.careers-meta-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-6) 0 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.careers-meta-list-centered {
  justify-content: center;
}

.careers-meta-list li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.careers-meta-list i {
  color: var(--accent-gold);
}

.careers-list-block {
  margin-top: var(--space-12);
}

.careers-list-block h3 {
  margin-bottom: var(--space-5);
}

.careers-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.careers-checklist li {
  position: relative;
  padding-left: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: 1.7;
}

.careers-checklist li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.15em;
  font-size: 0.8125rem;
  color: var(--accent-gold);
}

.careers-checklist-muted li::before {
  content: "\f067";
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Application shell
   -------------------------------------------------------------------------- */
.apply-shell {
  padding-top: var(--space-16);
}

.apply-head {
  text-align: center;
  margin-bottom: var(--space-12);
}

.apply-head h1 {
  margin-top: var(--space-4);
}

.apply-head .lead {
  margin-top: var(--space-4);
  font-size: 1rem;
  color: var(--text-secondary);
}

.is-hidden {
  display: none !important;
}

/* Step indicator */
.apply-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-10);
  counter-reset: apply-step;
}

.apply-steps li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 2px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo);
}

.apply-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  font-size: 0.8125rem;
  font-weight: 600;
}

.apply-steps li.is-current {
  color: var(--text-primary);
  border-top-color: var(--accent-gold);
}

.apply-steps li.is-current span {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #fff;
}

.apply-steps li.is-done {
  color: var(--text-secondary);
  border-top-color: var(--accent-gold);
}

/* Panels */
.apply-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
}

.apply-panel h2 {
  font-size: 1.5rem;
}

.apply-panel-intro {
  margin-top: var(--space-4);
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
}

.apply-alert {
  border-color: var(--accent-gold);
}

.apply-alert p {
  margin-top: var(--space-4);
  color: var(--text-secondary);
}

.apply-alert i {
  color: var(--accent-gold);
  margin-right: var(--space-2);
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */
.apply-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5) var(--space-6);
}

.apply-field {
  margin-bottom: var(--space-6);
}

.apply-field label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.apply-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.apply-field input[type="text"],
.apply-field input[type="email"],
.apply-field input[type="tel"],
.apply-field input[type="url"],
.apply-field select,
.apply-field textarea {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.apply-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.apply-field input:focus,
.apply-field select:focus,
.apply-field textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.apply-field input.is-invalid,
.apply-field select.is-invalid,
.apply-field textarea.is-invalid {
  border-color: #e05353;
}

.apply-hint {
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.apply-error {
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: #e05353;
  min-height: 1em;
}

.apply-form-error {
  margin: var(--space-6) 0 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid #e05353;
  background: rgba(224, 83, 83, 0.08);
  color: #e05353;
  font-size: 0.9375rem;
}

/* File input */
.apply-file {
  position: relative;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  transition: border-color var(--duration-fast);
}

.apply-file:hover {
  border-color: var(--accent-gold);
}

.apply-file input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.apply-file-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-align: center;
}

.apply-file-face i {
  color: var(--accent-gold);
}

/* Honeypot — off-screen rather than display:none, which some bots skip */
.apply-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Consent */
.apply-consents {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.apply-check {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  cursor: pointer;
}

.apply-check:last-of-type {
  margin-bottom: 0;
}

.apply-check input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 0.2em;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.apply-submit {
  width: 100%;
}

.apply-submit.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.apply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  margin-top: var(--space-8);
}

.apply-actions .btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Device setup
   -------------------------------------------------------------------------- */
.apply-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.apply-permission {
  padding: var(--space-6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.apply-permission-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.apply-permission-head > i {
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-top: 0.2em;
}

.apply-permission-head h3 {
  font-size: 1.0625rem;
}

.apply-permission-head p {
  margin-top: var(--space-1);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.apply-status {
  margin-left: auto;
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.apply-status.is-ok {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.apply-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: var(--space-4);
}

.apply-preview-lg {
  aspect-ratio: 16 / 9;
}

.apply-level {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.apply-level span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-gold);
  transition: width 80ms linear;
}

.apply-warning {
  margin-bottom: var(--space-4);
  font-size: 0.8125rem;
  color: var(--accent-gold);
}

.apply-notice {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-8);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.apply-notice i {
  color: var(--accent-gold);
  margin-top: 0.2em;
}

/* --------------------------------------------------------------------------
   Recording stage
   -------------------------------------------------------------------------- */
.apply-stage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.apply-question-card {
  padding: var(--space-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-secondary);
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.apply-question-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.apply-question-label {
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.apply-question-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--text-primary);
  flex: 1;
}

.apply-question-text.is-masked {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.125rem;
}

.apply-timebar {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  overflow: hidden;
  margin-top: var(--space-6);
}

.apply-timebar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-gold);
  transition: width 200ms linear;
}

.apply-timers {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.apply-recording-flag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: #e05353;
  font-weight: 600;
}

.apply-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: #e05353;
  animation: apply-pulse 1.2s infinite;
}

@keyframes apply-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.apply-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-8);
}

.apply-countdown span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-gold);
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent-gold);
}

/* --------------------------------------------------------------------------
   Review & done
   -------------------------------------------------------------------------- */
.apply-review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.apply-review-grid h3 {
  font-size: 1rem;
  margin-bottom: var(--space-3);
}

.apply-review-questions {
  list-style: none;
  padding: 0;
  margin: var(--space-8) 0 0;
}

.apply-review-questions li {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.apply-review-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--accent-gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.apply-progress {
  margin-top: var(--space-8);
}

.apply-progress p {
  margin-top: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.apply-done {
  text-align: center;
}

.apply-done > i {
  font-size: 3rem;
  color: var(--accent-gold);
  margin-bottom: var(--space-6);
}

.apply-done p {
  margin-top: var(--space-4);
  color: var(--text-secondary);
}

.apply-reference {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.apply-done .apply-actions {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Admin review
   -------------------------------------------------------------------------- */
.careers-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.careers-admin-table th,
.careers-admin-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.careers-admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.careers-admin-empty {
  padding: var(--space-10);
  text-align: center;
  color: var(--text-muted);
}

.careers-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.careers-admin-tab {
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.careers-admin-tab:hover {
  color: var(--text-primary);
}

.careers-admin-tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-gold, #c9a227);
  font-weight: 600;
}

.careers-admin-stage {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.careers-admin-stage-shortlisted {
  color: #2fb344;
  background: rgba(47, 179, 68, 0.12);
}

.careers-admin-stage-rejected {
  color: #e5484d;
  background: rgba(229, 72, 77, 0.12);
}

.careers-admin-delete {
  color: #e5484d;
  border-color: #e5484d;
  background: transparent;
}

.careers-admin-delete:hover {
  color: #fff;
  background: #e5484d;
}

/* --------------------------------------------------------------------------
   Distraction-free pages
   The application records the applicant's screen, so the floating widgets stay
   out of the way — and out of the recording.
   -------------------------------------------------------------------------- */
body[data-no-popups] .wa-widget,
body[data-no-popups] .popup-banner,
body[data-no-popups] .popup-overlay,
body[data-no-popups] #popup-trigger {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .apply-panel {
    padding: var(--space-6);
  }

  .apply-grid,
  .apply-permission-grid,
  .apply-review-grid {
    grid-template-columns: 1fr;
  }

  .apply-stage {
    grid-template-columns: 1fr;
  }

  .apply-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .apply-question-text {
    font-size: 1.25rem;
  }

  .apply-actions .btn {
    width: 100%;
  }
}
