/* Career Application Form — scoped to Career With Us / this CF7 form only */

.tg-career-application {
  --tg-career-navy: #102d59;
  --tg-career-green: #008b45;
  --tg-career-green-dark: #006b35;
  --tg-career-text: #273044;
  --tg-career-muted: #475569;
  --tg-career-border: #d7deea;
  --tg-career-border-focus: #008b45;
  --tg-career-bg: #f7f9fc;
  --tg-career-surface: #ffffff;
  --tg-career-error: #c62828;
  --tg-career-radius: 10px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  color: var(--tg-career-text);
  font-family: inherit;
}

.tg-career-application .tg-career-section {
  background: var(--tg-career-surface);
  border: 1px solid var(--tg-career-border);
  border-radius: 14px;
  padding: 22px 22px 8px;
  margin: 0 0 18px;
  box-shadow: 0 4px 16px rgba(16, 45, 89, 0.05);
}

.tg-career-application .tg-career-section__title {
  margin: 0 0 16px;
  padding: 0 0 10px;
  border-bottom: 2px solid rgba(0, 139, 69, 0.18);
  color: var(--tg-career-navy);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.tg-career-application .tg-career-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}

.tg-career-application .tg-career-field {
  margin: 0 0 16px;
  width: 100%;
}

.tg-career-application .tg-career-field--full {
  grid-column: 1 / -1;
}

.tg-career-application .tg-career-field > label {
  display: block;
  margin: 0;
  color: var(--tg-career-navy);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

/* CF7 inserts a <br> after label text; spacing comes from the control wrap instead. */
.tg-career-application .tg-career-field > label > br {
  display: none;
}

.tg-career-application .tg-career-field > label .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  margin-top: 7px;
}

.tg-career-application .tg-career-required {
  display: inline;
  color: var(--tg-career-green);
  font-weight: 700;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.tg-career-application .tg-career-help {
  display: block;
  margin-top: 6px;
  color: var(--tg-career-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 500;
}

.tg-career-application .tg-career-control,
.tg-career-application input.wpcf7-form-control,
.tg-career-application select.wpcf7-form-control,
.tg-career-application textarea.wpcf7-form-control {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--tg-career-border);
  border-radius: var(--tg-career-radius);
  background: var(--tg-career-bg);
  color: var(--tg-career-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.tg-career-application select.tg-career-control,
.tg-career-application select.wpcf7-form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23102d59' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 40px;
  cursor: pointer;
}

.tg-career-application textarea.tg-career-control,
.tg-career-application textarea.wpcf7-form-control {
  min-height: 120px;
  resize: vertical;
}

.tg-career-application input[type="file"].tg-career-control,
.tg-career-application input[type="file"].wpcf7-form-control {
  min-height: auto;
  padding: 12px;
  background: #eef6f1;
  border-style: dashed;
  cursor: pointer;
}

.tg-career-application .tg-career-control:hover,
.tg-career-application input.wpcf7-form-control:hover,
.tg-career-application select.wpcf7-form-control:hover,
.tg-career-application textarea.wpcf7-form-control:hover {
  border-color: #b7c4d8;
}

.tg-career-application .tg-career-control:focus,
.tg-career-application input.wpcf7-form-control:focus,
.tg-career-application select.wpcf7-form-control:focus,
.tg-career-application textarea.wpcf7-form-control:focus {
  outline: none;
  border-color: var(--tg-career-border-focus);
  background: var(--tg-career-surface);
  box-shadow: 0 0 0 3px rgba(0, 139, 69, 0.16);
}

.tg-career-application .tg-career-acceptance {
  margin-top: 4px;
}

.tg-career-application .wpcf7-acceptance {
  margin: 0;
}

.tg-career-application .wpcf7-list-item {
  margin: 0;
}

.tg-career-application .wpcf7-list-item-label {
  color: var(--tg-career-text);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.55;
}

.tg-career-application .tg-career-acceptance-input,
.tg-career-application input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 10px 0 0;
  accent-color: var(--tg-career-green);
  vertical-align: top;
  cursor: pointer;
}

.tg-career-application .tg-career-submit {
  margin: 8px 0 0;
  text-align: center;
}

.tg-career-application .tg-career-submit-btn,
.tg-career-application input.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 50px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #00a353 0%, var(--tg-career-green) 100%);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 139, 69, 0.28);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-career-application .tg-career-submit-btn:hover,
.tg-career-application input.wpcf7-submit:hover {
  background: linear-gradient(180deg, var(--tg-career-green) 0%, var(--tg-career-green-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 107, 53, 0.32);
}

.tg-career-application .tg-career-submit-btn:focus,
.tg-career-application input.wpcf7-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 139, 69, 0.22), 0 8px 18px rgba(0, 139, 69, 0.28);
}

.tg-career-application .tg-career-submit-btn:disabled,
.tg-career-application input.wpcf7-submit:disabled,
.wpcf7 .tg-career-application .wpcf7-submit.disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

/* CF7 validation / response — scoped under this form unit */
.wpcf7 form .tg-career-application .wpcf7-not-valid {
  border-color: var(--tg-career-error) !important;
  background: #fff7f7;
}

.wpcf7 form .tg-career-application .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  color: var(--tg-career-error);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.wpcf7 form:has(.tg-career-application) .wpcf7-response-output {
  margin: 18px auto 0;
  max-width: 920px;
  padding: 14px 18px;
  border-radius: 12px;
  border-width: 1px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.wpcf7 form.sent:has(.tg-career-application) .wpcf7-response-output {
  border-color: rgba(0, 139, 69, 0.35);
  background: #eef8f2;
  color: var(--tg-career-green-dark);
}

.wpcf7 form.invalid:has(.tg-career-application) .wpcf7-response-output,
.wpcf7 form.failed:has(.tg-career-application) .wpcf7-response-output,
.wpcf7 form.aborted:has(.tg-career-application) .wpcf7-response-output {
  border-color: rgba(198, 40, 40, 0.35);
  background: #fff5f5;
  color: var(--tg-career-error);
}

.wpcf7 form.submitting:has(.tg-career-application) .wpcf7-spinner {
  visibility: visible;
}

@media (max-width: 767px) {
  .tg-career-application .tg-career-section {
    padding: 18px 16px 4px;
    border-radius: 12px;
  }

  .tg-career-application .tg-career-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tg-career-application .tg-career-submit-btn,
  .tg-career-application input.wpcf7-submit {
    width: 100%;
    min-width: 0;
  }
}
