/* Staffing request + job seeker registration forms.
   Loaded only by staffing-request.php and submit-resume.php.
   Selectors that style <p>/<li>/<h2> are prefixed with .tf-doc .tf-form-page so
   they beat `.tf-theme-main .tf-doc p` in topfield-content.css. */

.tf-form-page {
  --tf-blue: #0b5cad;
  --tf-field-line: #cfdbe8;
  --tf-danger: #b42318;
}

.tf-form-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 960px) {
  .tf-form-layout {
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 2rem;
  }
}

/* —— Card —— */
.tf-form-card {
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--tf-line);
  border-radius: 1.25rem;
  box-shadow: 0 18px 48px rgba(15, 39, 68, 0.07);
}

.tf-doc .tf-form-page .tf-form-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.75rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--tf-line);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--tf-muted);
}
.tf-form-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.tf-form-meta span::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--tf-accent);
}

.tf-doc .tf-form-page .tf-form-alert {
  margin: 0 0 1.5rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid #f5c2c0;
  border-radius: 0.9rem;
  background: #fdecea;
  color: #8a1c1c;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* —— Sections —— */
.tf-form-section + .tf-form-section {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--tf-line);
}
.tf-theme-main .tf-doc .tf-form-page .tf-form-section__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--tf-navy);
}
.tf-form-section__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--tf-blue);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}
.tf-doc .tf-form-page .tf-form-section__intro {
  margin: -0.75rem 0 1.25rem;
  font-size: 0.95rem;
  color: var(--tf-muted);
}

.tf-form-grid {
  display: grid;
  gap: 1.15rem 1.25rem;
}
@media (min-width: 640px) {
  .tf-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.tf-field--wide {
  grid-column: 1 / -1;
}

/* —— Fields —— */
.tf-form-page fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.tf-field__label {
  display: block;
  margin: 0 0 0.45rem;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tf-navy);
}
.tf-field__label--sub {
  font-size: 0.88rem;
}
.tf-field__req {
  color: #c2410c;
}
.tf-field__optional {
  margin-left: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tf-muted);
}

.tf-form-page .tf-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  margin: 0;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--tf-field-line);
  border-radius: 0.75rem;
  background: #f9fbfd;
  color: var(--tf-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.tf-form-page .tf-input::placeholder {
  color: #8a99ab;
}
.tf-form-page .tf-input:hover {
  border-color: #a9bfd6;
}
.tf-form-page .tf-input:focus {
  outline: none;
  border-color: var(--tf-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 92, 173, 0.14);
}
.tf-form-page .tf-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230f2744' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 1rem;
  cursor: pointer;
}
.tf-form-page .is-invalid > .tf-input,
.tf-form-page .tf-input[aria-invalid="true"] {
  border-color: var(--tf-danger);
  background-color: #fff8f7;
}
.tf-form-page .tf-input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.14);
}

.tf-doc .tf-form-page .tf-field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--tf-muted);
}
.tf-doc .tf-form-page .tf-choice-group > .tf-field__hint {
  margin: -0.15rem 0 0;
}
.tf-doc .tf-form-page .tf-field__error {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tf-danger);
}
.tf-doc .tf-form-page .tf-field__error[hidden] {
  display: none;
}
.tf-field__error::before {
  content: "!";
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: var(--tf-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* —— Choice chips —— */
.tf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
}
.tf-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  padding: 0.55rem 1rem 0.55rem 0.8rem;
  border: 1px solid var(--tf-field-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tf-ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.tf-chip:hover {
  border-color: var(--tf-blue);
  transform: translateY(-1px);
}
.tf-chip input,
.tf-consent__label input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.tf-chip__mark {
  display: inline-flex;
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  box-sizing: border-box;
  border: 1.5px solid #9fb3c8;
  border-radius: 0.35rem;
  background: #fff center / 78% no-repeat;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tf-choice-group[data-kind="radio"] .tf-chip__mark {
  border-radius: 50%;
}
.tf-chip input:checked + .tf-chip__mark,
.tf-consent__label input:checked + .tf-chip__mark {
  border-color: var(--tf-blue);
  background-color: var(--tf-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E");
}
.tf-choice-group[data-kind="radio"] .tf-chip input:checked + .tf-chip__mark {
  background-image: none;
  background-color: #fff;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--tf-blue);
}
/* .is-checked is set by topfield-forms.js; :has() covers it without JS. Kept as
   separate rules so browsers without :has() still apply the first one. */
.tf-chip.is-checked {
  border-color: var(--tf-blue);
  background: rgba(11, 92, 173, 0.08);
  color: var(--tf-navy);
  font-weight: 600;
}
.tf-chip:has(input:checked) {
  border-color: var(--tf-blue);
  background: rgba(11, 92, 173, 0.08);
  color: var(--tf-navy);
  font-weight: 600;
}
.tf-chip input:focus-visible + .tf-chip__mark,
.tf-consent__label input:focus-visible + .tf-chip__mark {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tf-accent);
}
.tf-choice-group.is-invalid .tf-chip {
  border-color: #e7a8a1;
}

.tf-other {
  max-width: 28rem;
  margin-top: 0.9rem;
}
.tf-other[hidden] {
  display: none;
}

/* —— Consent —— */
.tf-consent__label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--tf-line);
  border-radius: 0.9rem;
  background: var(--tf-paper);
  color: var(--tf-ink);
  font-size: 0.95rem;
  line-height: 1.55;
  cursor: pointer;
}
.tf-consent__label .tf-chip__mark {
  margin-top: 0.15rem;
}
.tf-consent.is-invalid .tf-consent__label {
  border-color: #e7a8a1;
  background: #fff8f7;
}

/* —— Submit —— */
.tf-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tf-line);
}
.tf-doc .tf-form-page .tf-form-actions__note {
  margin: 0;
  max-width: 26rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--tf-muted);
}
.tf-theme-main .tf-form-page button.tf-form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-size: 1rem;
  box-shadow: 0 10px 24px rgba(255, 159, 28, 0.28);
}
.tf-theme-main .tf-form-page button.tf-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(255, 159, 28, 0.36);
}
.tf-form-submit__arrow {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.tf-form-submit:hover .tf-form-submit__arrow {
  transform: translateX(3px);
}
.tf-theme-main .tf-form-page button.tf-form-submit[aria-busy="true"] {
  opacity: 0.8;
  cursor: progress;
  transform: none;
}
.tf-form-submit[aria-busy="true"] .tf-form-submit__arrow {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  box-sizing: border-box;
  border: 2px solid rgba(15, 39, 68, 0.3);
  border-top-color: #0f2744;
  border-radius: 50%;
  font-size: 0;
  animation: tf-spin 0.7s linear infinite;
}
@keyframes tf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Side panel —— */
.tf-form-aside {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 960px) {
  .tf-form-aside {
    position: sticky;
    top: 2rem;
  }
}
.tf-doc .tf-form-page .tf-form-aside h3 {
  margin: 0;
  font-size: 1.15rem;
}
.tf-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tf-step;
}
.tf-doc .tf-form-page .tf-steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  counter-increment: tf-step;
}
.tf-steps li::before {
  content: counter(tf-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--tf-accent);
  font-weight: 700;
}
.tf-steps strong {
  display: block;
  color: #fff;
}
.tf-form-aside__contact {
  display: grid;
  gap: 0.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.tf-doc .tf-form-page .tf-form-aside__contact p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}
.tf-form-aside__contact a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tf-form-aside__contact a:hover,
.tf-form-aside__contact a:focus-visible {
  color: var(--tf-accent);
  text-decoration: underline;
}

/* —— Success —— */
.tf-form-success {
  padding: clamp(1rem, 4vw, 2.5rem) 0;
  text-align: center;
}
.tf-form-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: #e8f7ef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230f6b3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 55% no-repeat;
}
.tf-theme-main .tf-doc .tf-form-page .tf-form-success h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  color: var(--tf-navy);
}
.tf-doc .tf-form-page .tf-form-success p {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--tf-muted);
}
.tf-form-success .tf-doc__actions {
  justify-content: center;
  margin-top: 1.75rem;
}

/* Spam trap */
.tf-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
