/**
 * Careers job list — collapsible cards.
 *
 * Loaded after style.css on careers.html and careers-admin.html, so the few
 * rules here that restate a .job-card selector are deliberately overriding the
 * flat card in the main stylesheet rather than duplicating it.
 */

/**
 * Brand accent for the careers pages, replacing the site's orange --action.
 *
 * --burgundy is the submit button's tone. As a line against the near-black
 * fields it reads clearly, but as *text* it drops to 1.4:1 and is unreadable,
 * so labels and links use the lighter mauve from the same family.
 */
.career-area {
  --burgundy: #6b1e2e;
  --burgundy-mauve: #8a5c66;
}

.career-field input:focus,
.career-field select:focus,
.career-field textarea:focus,
.career-filter:focus,
.direct-apply-field.box input:focus,
.direct-apply-field.box textarea:focus,
.direct-apply-file-btn:hover,
.direct-apply-file input[type=file]:focus-visible + .direct-apply-file-btn {
  border-color: var(--burgundy);
}

.direct-apply-field.line input:focus {
  border-bottom-color: var(--burgundy);
}

.direct-apply-file-btn:hover,
.direct-apply-file input[type=file]:focus-visible + .direct-apply-file-btn,
.career-link-btn,
.career-table a {
  color: var(--burgundy-mauve);
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.job-card {
  padding: 0;
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.job-card:hover,
.job-card.is-open {
  border-color: rgba(238, 236, 215, 0.28);
}

.job-card-head {
  align-items: stretch;
  gap: 0;
}

/* The whole summary row is the control, so the arrow is an affordance rather
   than the only hit target. */
.job-card-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  color: var(--white);
  text-align: left;
  font-family: var(--font_sequelsansromanbody);
}

.job-card-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.job-card-toggle .job-title {
  display: block;
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--white);
}

.job-location {
  font-size: 13px;
  line-height: 1.3;
  color: var(--white-2);
}

.job-card-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--white-2);
  transition: color 0.25s ease;
}

.job-card-toggle:hover .job-card-cta,
.job-card-toggle:focus-visible .job-card-cta {
  color: var(--white);
}

.job-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(238, 236, 215, 0.25);
  border-radius: 50%;
  font-size: 13px;
  transition: transform 0.3s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.job-card-toggle:hover .job-card-arrow,
.job-card-toggle:focus-visible .job-card-arrow {
  background: var(--white);
  border-color: var(--white);
  color: #242323;
}

.job-card.is-open .job-card-arrow {
  transform: rotate(90deg);
}

/* 0fr → 1fr animates to the content's own height, so a card stays smooth even
   as the apply form expands inside it. Browsers that can't interpolate grid
   tracks simply snap open. */
.job-card-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.job-card.is-open .job-card-details {
  grid-template-rows: 1fr;
}

.job-card-details-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 24px;
}

.job-card.is-open .job-card-details-inner {
  padding-bottom: 24px;
}

.job-card-details-inner .job-meta {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.job-card-details-inner .job-meta,
.job-card-details-inner .job-text {
  margin-top: 14px;
}

.career-remove-btn {
  align-self: center;
  padding-right: 24px;
}

@media only screen and (max-width: 575px) {
  .job-card-toggle {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }
  .job-card-cta {
    justify-content: space-between;
    width: 100%;
  }
  .job-card-toggle .job-title {
    font-size: 18px;
  }
  .job-card-details-inner {
    padding: 0 20px;
  }
  .job-card.is-open .job-card-details-inner {
    padding-bottom: 20px;
  }
  .career-remove-btn {
    align-self: flex-start;
    padding: 0 20px 16px;
  }
}
