/* 지원서 (/careers/apply[/{번호}]) 둘째 장 — 개인정보 동의 · 오른쪽 상자(지원 포지션 · 항목 목차) · 제출 · 보낸 뒤 화면.
 * 틀 · 칸 · 파일 첨부는 careers-apply.css (둘 다 지원서 화면만 건다). 색은 sb.css 토큰만. */

/* ---------- 동의 ---------- */
.ap-consent-official {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.ap-consents {
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
}
.ap-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}
.ap-check--all {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 16px;
  font-weight: 800;
}
.ap-check__text {
  min-width: 0;
}
.ap-check__meaning {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ap-checkbox {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  background: var(--surface) center / 14px no-repeat;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}
.ap-check:hover .ap-checkbox:not(:checked):not(:indeterminate) {
  border-color: var(--ink);
}
.ap-checkbox:checked {
  border-color: var(--red);
  background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.ap-checkbox:indeterminate {
  border-color: var(--red);
  background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}
.ap-checkbox:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
}
.ap-checkbox[aria-invalid='true'] {
  border-color: var(--red-text);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.ap-consent {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 20px;
}
.ap-consent + .ap-consent {
  border-top: 1px solid var(--line);
}
.ap-consent .ap-check {
  padding-right: 84px;
}
.ap-consent .ap-error {
  margin-left: 34px;
}
.ap-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
  vertical-align: 1px;
}
.ap-badge.is-required {
  background: var(--red-soft);
  color: var(--red-text);
}
.ap-consent__more > summary {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}
@media (pointer: coarse) {
  .ap-consent__more > summary {
    top: 6px;
    min-height: 44px;
  }
}
.ap-consent__more > summary::-webkit-details-marker {
  display: none;
}
.ap-consent__more > summary svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease);
}
.ap-consent__more > summary:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.ap-consent__more[open] > summary {
  color: var(--ink);
}
.ap-consent__more[open] > summary svg {
  transform: rotate(180deg);
}
.ap-consent__more > summary:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
}
.ap-consent__panel {
  margin: 4px 0 0 34px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.ap-consent__title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.ap-consent__panel dl {
  margin: 12px 0 0;
}
.ap-consent__panel dl > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.ap-consent__panel dt {
  font-weight: 700;
  color: var(--muted);
}
.ap-consent__panel dd {
  margin: 0;
  color: var(--ink);
}
.ap-consent__note {
  margin-top: 10px;
  font-weight: 700;
  color: var(--ink);
}
.ap-submit-note {
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.ap-submit-note a,
.ap-done__help a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 오른쪽 상자 · 제출 ---------- */
.ap-card {
  display: none;
}
@media (min-width: 1000px) {
  .ap-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-1);
  }
}
.ap-side__job {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.ap-side__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.ap-side__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.ap-side__meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ap-index ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* 스크롤로 지금 항목이 바뀔 때 다시 칠하지 않게 — 전환 없음, 굵기도 그대로 (예전 지원서와 같은 약속) */
.ap-index__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.ap-index__link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.ap-index__mark {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: var(--surface) center / 10px no-repeat;
}
.ap-index__link.is-current {
  color: var(--ink);
}
.ap-index__link.is-current .ap-index__mark {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2.5px var(--surface);
  background-color: var(--ink);
}
.ap-index__link.is-done .ap-index__mark {
  border-color: var(--ink);
  background-color: var(--ink);
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.ap-submitbar {
  display: grid;
  gap: 10px;
}
@media (min-width: 1000px) {
  .ap-submitbar {
    margin-top: 16px;
  }
}
.ap-form-error {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--red-soft);
  color: var(--red-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.ap-submit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 54px;
  font-size: 16px;
}
/* 보내는 동안 단추 안에서 차오르는 진행 (--progress 0~1, careers-apply.js) */
.ap-submit__fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform 200ms linear;
}
.ap-submit.is-sending {
  cursor: progress;
}
.ap-submit:disabled {
  opacity: 1;
  transform: none;
  box-shadow: none;
}

/* ---------- 보낸 뒤 ---------- */
.ap-done {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 720px;
  margin: clamp(8px, 2vw, 24px) auto 0;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 4vw, 48px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  text-align: center;
}
.ap-done:focus {
  outline: none;
}
.ap-done__mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
}
.ap-done__mark svg {
  width: 32px;
  height: 32px;
}
.ap-done__title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.ap-done__lead {
  max-width: 46ch;
  line-height: 1.7;
  color: var(--ink-2);
}
.ap-done__facts {
  display: grid;
  width: 100%;
  margin: 6px 0 0;
  text-align: left;
  border-top: 1px solid var(--line);
}
.ap-done__facts > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ap-done__facts dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.ap-done__facts dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ap-done__mail {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  color: var(--ink-2);
}
.ap-done__mail svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.ap-done__subtitle {
  justify-self: start;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 800;
}
.ap-done__steps {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  counter-reset: ap-step;
}
.ap-done__steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 12px;
  counter-increment: ap-step;
}
.ap-done__steps li::before {
  content: counter(ap-step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}
.ap-done__steps strong {
  font-size: 15px;
}
.ap-done__steps span {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.ap-done__help {
  font-size: 14px;
  color: var(--ink-2);
}
.ap-done__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .ap-submit__fill {
    transition: none;
  }
}
