/* =========================================================
   06 상담 신청 — 페이지 안 신청 폼 (시안에 모달 없음)
   상태: 입력 → 입력 오류 → 동의 전문 펼침 → 신청 완료 / 저장 실패
   ========================================================= */
.apply {
  background: var(--c-navy);
  color: #fff;
  scroll-margin-top: var(--header-h);
}

.apply__inner {
  display: grid;
  gap: 32px;
}

.apply .section__title,
.apply .section__desc {
  text-align: left;
}

.apply .section__desc {
  color: rgba(255, 255, 255, 0.92);
}

.apply__points {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.5;
}

.apply__points li {
  position: relative;
  padding-left: 12px;
}

.apply__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 카드 ---------- */
.apply-card {
  padding: 24px 20px;
  border: 1px solid #466089;
  border-radius: 2px;
  background: #19396c;
}

.apply-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.apply-card__title small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #c9d2e3;
}

.consult-form__grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.apply-card .input {
  height: 48px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #f5f6fa;
  font-size: 16px; /* iOS 확대 방지 */
  color: var(--c-text);
}

.apply-card .input::placeholder {
  color: #9398ad;
}

.apply-card .input:focus {
  border-color: #6ea1ff;
  box-shadow: 0 0 0 3px rgba(110, 161, 255, 0.35);
}

.apply-card .is-invalid .input,
.apply-card .input[aria-invalid='true'] {
  border-color: #ff8a80;
  box-shadow: 0 0 0 1px #ff8a80;
}

.field__error {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #ffb4ab;
}

/* honeypot: 화면 밖으로 보냄 (display:none 은 일부 봇이 건너뛰므로 사용하지 않음) */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 동의 ---------- */
.consents {
  margin: 28px 0 0;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid #466089;
}

.consent + .consent {
  margin-top: 16px;
}

.consent__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #d9dbe6;
}

.consent__text {
  flex: 1;
  min-width: 0;
}

.consent__label {
  cursor: pointer;
}

/* 라벨 문장 바로 뒤에 이어서 흐르도록 inline */
.consent__toggle {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent__toggle:hover {
  color: #fff;
}

/* 체크박스 */
.check {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  border: 1px solid #d9dbe6;
  border-radius: 2px;
  background: #d9dbe6;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.check:checked {
  border-color: #3b82ff;
  background: #3b82ff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.check:focus-visible {
  outline: 2px solid #6ea1ff;
  outline-offset: 2px;
}

.consent.is-invalid .check {
  border-color: #ff8a80;
  box-shadow: 0 0 0 1px #ff8a80;
}

.consent .field__error {
  padding-left: 26px;
}

.consent__body {
  margin: 10px 0 0 26px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  line-height: 1.65;
  color: #d9dbe6;
}

.consent-terms {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.consent-terms__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.consent-terms dt {
  font-weight: 700;
  color: #fff;
}

.consent-terms dd {
  margin: 0;
}

.consent__notice {
  font-weight: 500;
  color: #fff;
}

/* ---------- 전송 ---------- */
.form-error {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 138, 128, 0.5);
  border-radius: 2px;
  background: rgba(255, 92, 80, 0.14);
  font-size: 14px;
  line-height: 1.5;
  color: #ffd5cf;
}

.consult-form__submit {
  min-height: 54px;
  margin-top: 28px;
  font-size: 18px;
  font-weight: 700;
}

.consult-form__submit[aria-busy='true'] {
  cursor: progress;
}

.consult-form__submit[aria-busy='true']::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 완료 ---------- */
.consult-done {
  padding: 40px 0 16px;
  text-align: center;
}

.consult-done:focus {
  outline: none;
}

.consult-done__icon {
  margin: 0 auto 20px;
  color: #7fb0ff;
}

.consult-done__title {
  font-size: 22px;
  font-weight: 700;
}

.consult-done__desc {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: #d9dbe6;
}

.consult-done__again {
  margin-top: 28px;
  padding: 4px 0;
  border: 0;
  background: none;
  font-size: 14px;
  color: #c9d2e3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consult-done__again:hover {
  color: #fff;
}

/* ---------- 태블릿 이상 ---------- */
@media (min-width: 768px) {
  .apply__points {
    gap: 14px;
    margin-top: 32px;
    font-size: 16px;
  }

  .apply-card {
    padding: 27px 28px 28px;
  }

  .apply-card__title {
    font-size: 24px;
  }

  .apply-card__title small {
    display: inline;
    margin: 0 0 0 4px;
  }

  .consult-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 20px;
    margin-top: 32px;
  }

  .apply-card .input {
    font-size: 15px;
  }

  .consents {
    margin-top: 40px;
    padding-top: 40px;
  }

  .consent + .consent {
    margin-top: 17px;
  }

  .consent__row {
    font-size: 12px;
  }

  .check {
    margin-top: 1px;
  }

  .consent .field__error,
  .consent__body {
    font-size: 12px;
  }

  .consult-form__submit {
    min-height: 58px;
    margin-top: 53px;
    font-size: 20px;
  }

  .consult-done {
    padding: 72px 0 48px;
  }
}

@media (min-width: 1200px) {
  .apply__inner {
    grid-template-columns: minmax(0, 1fr) 657px;
    align-items: start;
    gap: 40px;
  }
}

@media (min-width: 1200px) {
  .apply {
    padding-top: 121px;
    padding-bottom: 117px;
  }

  .apply__intro {
    padding-top: 1px;
  }

  .apply .section__desc {
    margin-top: 19px;
  }

  .apply__points {
    gap: 14px;
    margin-top: 40px;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: -0.01em;
  }
}
