/* 견적 요청 · 서비스 신청(/apply) · 접수 완료 · 신청 닫힘 — 소개 홈(public-landing.css)과 같은 디자인 언어.
   public.css(공통) 뒤에 실려 덮어쓴다. 값은 public.css 의 변수에 기대지 않고 .apply-page 범위 변수로 직접 정한다. */

.apply-page {
  --ap-ink: #0b1220;
  --ap-ink-2: #4d5768;
  --ap-muted: #5d6677;
  --ap-line: #e4e7ee;
  --ap-field: #cfd4df;
  --ap-field-hover: #aeb5c4;
  --ap-bg: #f5f6f9;
  --ap-point: #2E3BB0;
  --ap-point-dark: #242F91;
  --ap-point-soft: #eceefb;
  --ap-err: #b42318;
  --ap-ring: 0 0 0 3px rgba(46, 59, 176, .18);
  background: var(--ap-bg);
  color: var(--ap-ink);
}
.apply-page [hidden] { display: none !important; }
.apply-page .wrap { max-width: 1140px; padding: 0 24px; }
.apply-page a { color: var(--ap-point); }
.apply-page a:hover { color: var(--ap-point-dark); }
.apply-page :focus-visible { outline-color: var(--ap-point); }

/* ── 머리 구역 ───────────────────────────────────────── */
.apply-page .apply-head { max-width: 720px; padding: 56px 0 28px; }
.apply-eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: .01em; color: var(--ap-point); }
.apply-page .apply-head h1 {
  font-size: clamp(30px, 4.2vw, 44px); font-weight: 800; line-height: 1.2;
  letter-spacing: -0.035em; color: var(--ap-ink);
}
.apply-page .apply-head p.apply-lead { margin-top: 16px; font-size: 17px; line-height: 1.7; color: var(--ap-ink-2); }

.apply-page .form-notice {
  max-width: 720px; margin: 0 0 20px; padding: 14px 18px;
  border: 1px solid #f4c7c3; border-radius: 12px; background: #fef3f2;
  color: var(--ap-err); font-weight: 600;
}

/* ── 틀: 폼 + 오른쪽 패널 ─────────────────────────────── */
.apply-layout { padding: 0 0 80px; }
.apply-layout.has-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.apply-page .apply-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 0; }
.apply-page .apply-grid.apply-grid-solo { display: block; max-width: none; }
.apply-page .apply-main { min-width: 0; counter-reset: fs; }
.apply-page .apply-side, .apply-aside { position: static; min-width: 0; }

@media (min-width: 1000px) {
  .apply-layout.has-aside { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .apply-page .apply-grid:not(.apply-grid-solo) { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .apply-page .apply-side, .apply-aside { position: sticky; top: 88px; }
}

/* ── 구역 카드 ───────────────────────────────────────── */
.apply-page .fs {
  min-width: 0; margin: 0 0 16px; padding: 28px 28px 30px;
  border: 1px solid var(--ap-line); border-radius: 16px; background: #fff;
}
.apply-page .fs:first-of-type { padding-top: 28px; border-top: 1px solid var(--ap-line); }
.apply-page .fs legend {
  float: left; width: 100%; display: flex; align-items: center; gap: 12px;
  margin: 0 0 22px; padding: 0;
  font-size: 19.5px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; color: var(--ap-ink);
}
.apply-page .fs legend::before {
  counter-increment: fs; content: counter(fs);
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ap-ink); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.apply-page .fs > legend ~ * { clear: both; }
.apply-page .fs legend .opt { font-weight: 500; font-size: 15px; color: var(--ap-muted); }

/* ── 칸 ──────────────────────────────────────────────── */
/* 칸 안 순서: 이름 → 입력 → 도움말 → 오류. 2열 줄에서 입력칸 높이가 도움말 길이와 무관하게 맞는다(DOM 순서는 그대로) */
.apply-page .field { display: flex; flex-direction: column; margin: 0 0 20px; }
.apply-page .field > .hint { order: 2; margin: 8px 0 0; }
.apply-page .field > .err { order: 3; }
.apply-page .fs > .field:last-child,
.apply-page .fs > .field-row:last-child > .field:last-child { margin-bottom: 0; }
@media (min-width: 641px) { .apply-page .fs > .field-row:last-child > .field { margin-bottom: 0; } }
.apply-page .field > label:not(.check) { display: block; margin-bottom: 7px; font-size: 15.5px; font-weight: 600; color: var(--ap-ink); }
.apply-page .hint { margin: 0 0 9px; font-size: 14.5px; line-height: 1.65; color: var(--ap-muted); }
.apply-page .fs > .hint { margin-bottom: 16px; }

.field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
@media (min-width: 641px) {
  .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.apply-page .input {
  display: block; width: 100%; max-width: none; height: 48px; padding: 0 14px;
  border: 1px solid var(--ap-field); border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ap-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.apply-page .input:hover { border-color: var(--ap-field-hover); }
.apply-page .input:focus { border-color: var(--ap-point); outline: none; box-shadow: var(--ap-ring); }
.apply-page textarea.input { height: auto; min-height: 132px; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.apply-page input[type="file"].input { height: auto; padding: 10px 12px; font-size: 15px; }
.apply-page input[type="date"].input { max-width: 100%; }
.apply-page .input-short { max-width: 220px; }
.apply-page select.input {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  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 d='M1 1.5l5 5 5-5' fill='none' stroke='%234d5768' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
.apply-page .has-error .input { border-color: var(--ap-err); }
.apply-page .has-error .input:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .16); }
.apply-page .err { margin-top: 7px; font-size: 14.5px; font-weight: 600; color: var(--ap-err); }

.apply-page .req {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--ap-point-soft); color: var(--ap-point);
  font-size: 12px; font-weight: 600; line-height: 1.6; vertical-align: 2px; letter-spacing: 0;
}
.apply-page .fs legend .req { margin-left: 0; font-size: 12px; }

/* ── 선택 카드(모듈 · 행사 1건/연간 · 옵션) ─────────────── */
.apply-page .pick { display: grid; gap: 8px; border: 0; background: transparent; }
.apply-page .pick-row {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border: 1px solid var(--ap-line); border-top: 1px solid var(--ap-line); border-radius: 12px; background: #fff;
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.apply-page .pick-row:first-child { border-top: 1px solid var(--ap-line); }
.apply-page .pick-row:hover { border-color: var(--ap-field-hover); }
.apply-page .pick-row.on,
.apply-page .pick-row:has(input:checked:not(:disabled)) { border-color: var(--ap-point); background: var(--ap-point-soft); }
.apply-page .pick-row:focus-within { outline: 0; box-shadow: var(--ap-ring); border-color: var(--ap-point); }
.apply-page .pick-row input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ap-point); }
.apply-page .pick-body b { display: block; font-size: 16.5px; font-weight: 700; color: var(--ap-ink); }
.apply-page .pick-body span { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.6; color: var(--ap-ink-2); }
.apply-page .pick-body .pick-price { color: var(--ap-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 들여쓴 패널: 등록 사이트 아래 행사 1건/연간 · 온라인 인원/기간 · 세금계산서 */
.apply-page .tax-box {
  margin-top: 12px; padding: 18px 20px; border: 0; border-left: 0;
  border-radius: 12px; background: var(--ap-bg);
}
.apply-page .pick > .module-box { margin: 0 0 0 34px; padding: 16px 18px; border: 0; border-radius: 12px; background: var(--ap-bg); }
.apply-page .module-box .pick { background: transparent; }
.apply-page .module-box > .hint { margin: 0 0 10px; }
.apply-page .tax-box > .field:last-child { margin-bottom: 0; }
.apply-page #noreg-note { margin: 12px 0 0; }

.apply-page .check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15.5px; }
.apply-page .check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ap-point); }

/* ── 보내기 ───────────────────────────────────────────── */
.apply-page .cf-turnstile { margin: 8px 0 0; }
.apply-page .submit-row { margin-top: 24px; padding-top: 0; border-top: 0; }
.apply-page .btn-point { background: var(--ap-point); color: #fff; }
.apply-page .btn-point:hover { background: var(--ap-point-dark); color: #fff; }
.apply-page .submit-row .btn-big,
.apply-page .quote-box .btn-block {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 32px; border: 0; border-radius: 10px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  transition: background-color .15s ease;
}
.apply-page .quote-box .btn-block { display: flex; width: 100%; min-height: 50px; padding: 0 20px; font-size: 16px; }
.apply-page .submit-row .hint { margin: 12px 0 0; }

/* ── 오른쪽: 견적 요청제 안내 패널 ──────────────────────── */
.aside-steps { padding: 28px 26px; border-radius: 16px; background: var(--ap-ink); color: #fff; }
.aside-steps h2 { margin: 0 0 20px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.aside-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: as; }
.aside-steps li {
  counter-increment: as; position: relative; padding: 0 0 18px 40px;
  font-size: 15px; line-height: 1.65; color: #d3d8e2;
}
.aside-steps li:last-child { padding-bottom: 0; }
.aside-steps li::before {
  content: counter(as); position: absolute; left: 0; top: 0;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 1px solid #4a5468; border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff;
}
.aside-contact { margin-top: 12px; padding: 22px 24px; border: 1px solid var(--ap-line); border-radius: 16px; background: #fff; }
.aside-contact h2 { margin: 0 0 12px; font-size: 16px; font-weight: 800; letter-spacing: -0.015em; color: var(--ap-ink); }
.aside-contact dl { margin: 0; }
.aside-contact div { display: flex; gap: 12px; padding: 6px 0; font-size: 15px; }
.aside-contact dt { flex: none; width: 44px; color: var(--ap-muted); }
.aside-contact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--ap-ink); font-weight: 600; }
.aside-facts { list-style: none; margin: 18px 0 0; padding: 0 4px; }
.aside-facts li { position: relative; padding: 3px 0 3px 24px; font-size: 14px; color: var(--ap-ink-2); }
.aside-facts li::before {
  content: ""; position: absolute; left: 3px; top: .62em;
  width: 9px; height: 5px; border-left: 2px solid var(--ap-point); border-bottom: 2px solid var(--ap-point);
  transform: rotate(-45deg);
}

/* ── 오른쪽: 요금 공개 견적 상자(마크업은 public.js 가 다시 그린다 — 이름만 맞춘다) ── */
.apply-page .quote-box { padding: 24px 24px 22px; border: 1px solid var(--ap-line); border-radius: 16px; background: #fff; }
.apply-page .quote-box h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.apply-page .quote-tbl { font-size: 15px; }
.apply-page .quote-tbl th { color: var(--ap-ink-2); }
.apply-page .quote-tbl tfoot tr:first-child th,
.apply-page .quote-tbl tfoot tr:first-child td { border-top: 1px solid var(--ap-line); padding-top: 12px; }
.apply-page .quote-tbl .q-total th,
.apply-page .quote-tbl .q-total td { padding-top: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ap-ink); }
.apply-page .quote-tbl .q-total th { font-size: 16px; vertical-align: bottom; }
.apply-page .q-only { font-size: 14px; color: var(--ap-ink-2); }
.apply-page .quote-note { margin: 16px 0; font-size: 14px; color: var(--ap-muted); }
.apply-page .quote-empty { color: var(--ap-muted); }

/* ── 접수 완료 · 신청 닫힘 ─────────────────────────────── */
.apply-page .done-wrap { max-width: 1140px; padding-top: 56px; padding-bottom: 80px; }
.done-card {
  max-width: 760px; margin: 0 auto; padding: 44px 44px 40px;
  border: 1px solid var(--ap-line); border-radius: 16px; background: #fff;
}
.done-card h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; line-height: 1.25; letter-spacing: -0.03em; color: var(--ap-ink); }
.done-card h2 { margin: 36px 0 12px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.apply-page .done-lead { margin-top: 16px; font-size: 16.5px; line-height: 1.75; color: var(--ap-ink-2); }
.apply-page .done-no {
  display: inline-block; margin: 0 2px; font-size: 24px; font-weight: 800;
  letter-spacing: 0.01em; color: var(--ap-ink); font-variant-numeric: tabular-nums;
}
.done-card .tbl {
  border-collapse: separate; border-spacing: 0; overflow: hidden;
  border: 1px solid var(--ap-line); border-radius: 12px; margin: 4px 0 18px;
}
.done-card .tbl th, .done-card .tbl td { border: 0; border-bottom: 1px solid var(--ap-line); padding: 12px 16px; font-size: 15.5px; }
.done-card .tbl tr:last-child th, .done-card .tbl tr:last-child td { border-bottom: 0; }
.done-card .tbl tbody th { background: var(--ap-bg); font-weight: 600; color: var(--ap-ink-2); }
.done-card .tbl-quote tbody th { background: #fff; font-weight: 400; }
.done-card .tbl-quote .row-total th, .done-card .tbl-quote .row-total td { background: var(--ap-point-soft); color: var(--ap-ink); font-weight: 800; font-size: 17px; }
.done-card .bank {
  margin-bottom: 8px; padding: 16px 18px; border: 1px solid var(--ap-line); border-radius: 12px;
  background: var(--ap-bg); font-size: 18px; font-weight: 700;
}
.done-card .steps { margin: 6px 0 0; max-width: none; }
.done-card .steps li { border-left-color: var(--ap-line); }
.done-card .steps li::before { background: var(--ap-ink); }
.done-card .steps li b { font-size: 16.5px; }
.done-card .steps li p { color: var(--ap-ink-2); font-size: 15.5px; }
.done-card .hint { margin-top: 12px; }
.apply-page .done-contact { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--ap-line); color: var(--ap-ink-2); }
.apply-page .done-back { margin-top: 10px; }
.done-card > p:not([class]) { margin-top: 14px; color: var(--ap-ink-2); }

/* ── 좁은 화면 ───────────────────────────────────────── */
@media (max-width: 999px) {
  /* 견적 상자가 폼 아래로 내려오면 그 상자의 버튼 하나만 남긴다(public.css 900px 규칙과 같은 뜻) */
  .apply-page .apply-grid:not(.apply-grid-solo) .submit-row .btn { display: none; }
}
@media (max-width: 640px) {
  .apply-page .wrap { padding: 0 18px; }
  .apply-page .apply-head { padding: 36px 0 22px; }
  .apply-page .apply-head p.apply-lead { font-size: 16px; }
  .apply-page .fs, .apply-page .fs:first-of-type { padding: 22px 18px 24px; }
  .apply-page .fs legend { font-size: 18.5px; margin-bottom: 18px; }
  .apply-page .pick > .module-box { margin-left: 0; }
  .apply-page .pick-row { padding: 14px 14px; }
  .apply-page .tax-box { padding: 16px; }
  .apply-page .submit-row .btn-big { display: flex; width: 100%; }
  .apply-page .input-short { max-width: none; }
  .apply-page .done-wrap { padding-top: 28px; padding-bottom: 56px; }
  .done-card { padding: 28px 20px 26px; }
  .done-card .tbl:not(.tbl-quote) { border: 0; border-radius: 0; overflow: visible; }
  .done-card .tbl:not(.tbl-quote) tr { border: 1px solid var(--ap-line); }
  .done-card .tbl:not(.tbl-quote) tr:first-child { border-radius: 12px 12px 0 0; }
  .done-card .tbl:not(.tbl-quote) tr:last-child { border-radius: 0 0 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .apply-page .input, .apply-page .pick-row, .apply-page .btn { transition: none; }
}
@media (forced-colors: active) {
  .apply-page .input:focus, .apply-page .pick-row:focus-within { outline: 2px solid CanvasText; }
}
@media print {
  .apply-page { background: none; }
  .apply-aside { display: none; }
  .apply-page .fs, .done-card { border: 0; padding: 10px 0; }
}
