/* apply.css — styles for /apply
   Inherits brand tokens and base styles from styles.css */


/* ── Not-found state ─────────────────────────────────────────────────────── */

.apply-not-found {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.apply-not-found h2 {
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
}

.apply-not-found p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}


/* ── Role context band ───────────────────────────────────────────────────── */

.apply-role-band {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.apply-role-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.apply-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.apply-back:hover { color: var(--gold-dark); }

.apply-role-info {}

.apply-role-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 11px;
  flex-shrink: 0;
}

.apply-role-logo[hidden] {
  display: none;
}

.apply-role-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.18rem;
}

.apply-role-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: normal;
  color: var(--ink);
  margin-bottom: 0.1rem;
}

.apply-role-org {
  font-size: 0.88rem;
  color: var(--ink-soft);
}


/* ── Form wrapper ────────────────────────────────────────────────────────── */

.apply-section { padding-top: 2.5rem; }

.apply-wrap {
  max-width: 720px;
}

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.apply-form[hidden] {
  display: none;
}


/* ── Section blocks ──────────────────────────────────────────────────────── */

.apply-section-block {
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}

.apply-section-block:last-of-type {
  border-bottom: none;
}

.apply-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.apply-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}

.apply-section-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  color: var(--ink);
}

.apply-optional-tag {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}


/* ── Fields ──────────────────────────────────────────────────────────────── */

.apply-field {
  margin-bottom: 1rem;
}

.apply-field:last-child { margin-bottom: 0; }

.apply-field > label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.42rem;
  color: var(--ink);
}

.apply-req {
  color: var(--gold-dark);
  margin-left: 0.1rem;
}

.apply-optional {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-left: 0.25rem;
}

.apply-field input[type="text"],
.apply-field input[type="email"],
.apply-field input[type="tel"],
.apply-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.apply-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235f5b5b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.apply-field input:focus,
.apply-field select:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(242, 113, 21, 0.12);
}

.apply-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.apply-other-field {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.apply-other-field label {
  font-size: 0.84rem !important;
  margin-bottom: 0.35rem !important;
  font-weight: 600 !important;
}


/* ── File upload ─────────────────────────────────────────────────────────── */

.apply-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.65rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: var(--surface);
}

.apply-upload:hover {
  border-color: var(--gold-dark);
  background: var(--gold-soft);
}

.apply-upload.has-file {
  border-color: var(--gold-dark);
  background: var(--gold-soft);
  border-style: solid;
}

.apply-upload.has-error {
  border-color: #c94a39;
  background: #fef2f2;
}

.apply-upload.has-error .apply-upload-main {
  color: #c94a39;
}

.apply-upload.has-error .apply-upload-icon {
  color: #c94a39;
}

@keyframes upload-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.apply-upload.do-shake {
  animation: upload-shake 0.35s ease;
}

.apply-upload-error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: #fef2f2;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #c94a39;
  line-height: 1.4;
}

.apply-upload-error[hidden] {
  display: none;
}

.apply-upload-error svg {
  flex-shrink: 0;
  color: #c94a39;
}

.apply-upload.is-dragover {
  border-color: var(--gold-dark);
  background: var(--gold-soft);
}

.apply-upload-icon {
  color: var(--ink-soft);
  line-height: 0;
  transition: color 0.2s ease;
}

.apply-upload:hover .apply-upload-icon,
.apply-upload.has-file .apply-upload-icon {
  color: var(--gold-dark);
}

.apply-upload-main {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
}

.apply-upload.has-file .apply-upload-main {
  color: var(--gold-dark);
}

.apply-upload-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.apply-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip: rect(0, 0, 0, 0);
}


/* ── Demographics ────────────────────────────────────────────────────────── */

.apply-demog-intro {
  background: var(--surface-alt);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.apply-demog-intro strong { color: var(--ink); }

.apply-select-all {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 0.25rem;
}

.apply-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.apply-radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.apply-radio input[type="radio"],
.apply-radio input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-dark);
  flex-shrink: 0;
  cursor: pointer;
}

.apply-radio-selfid {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.apply-inline-text {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  color: var(--ink);
  background: var(--surface);
  width: 160px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.apply-inline-text:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(242, 113, 21, 0.12);
}

.apply-inline-text:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.apply-radio-decline {
  color: var(--ink-soft);
  margin-top: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.apply-radio-decline input {
  accent-color: var(--ink-soft) !important;
}

.apply-field-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}


/* ── Submit ──────────────────────────────────────────────────────────────── */

.apply-submit-area {
  margin-top: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.apply-submit-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 58ch;
}

.apply-recaptcha {
  margin: 0.25rem 0;
}

.apply-submit-btn {
  align-self: flex-start;
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bot-field-wrapper {
  display: none !important;
  visibility: hidden;
}


/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .apply-role-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

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

/* ── Per-field validation errors (injected by apply.js) ─────────────────── */
.apply-field-errmsg {
  color: #b00020;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.4rem 0 0;
}
.apply-field-invalid input,
.apply-field-invalid select,
.apply-field-invalid textarea {
  border-color: #b00020;
}
