/* ==================================================
   민원109 신규 발급신청
   apply-start.css
================================================== */

:root {
  --apply-primary: #2684ff;
  --apply-primary-hover: #1d4ed8;
  --apply-text: #172033;
  --apply-muted: #667085;
  --apply-line: #e5eaf1;
  --apply-bg: #f5f7fb;
  --apply-green: #16a36a;
}

.apply-page {
  background: var(--apply-bg);
}

.apply-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 24px auto 48px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.apply-sidebar {
  min-width: 0;
}

.apply-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==================================================
   1. 페이지 제목
================================================== */

.apply-heading {
  padding: 8px 2px 2px;
}

.apply-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--apply-muted);
  font-size: 13px;
  font-weight: 800;
}

.apply-kicker {
  display: block;
  color: var(--apply-primary);
  font-size: 12px;
  font-weight: 900;
}

.apply-heading h1 {
  margin: 5px 0 8px;
  color: var(--apply-text);
  font-size: 32px;
  letter-spacing: -0.045em;
}

.apply-heading p {
  margin: 0;
  color: var(--apply-muted);
  font-size: 14px;
}

/* ==================================================
   2. 진행 단계
================================================== */

.apply-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--apply-line);
  border-radius: 18px;
}

.progress-item {
  position: relative;
  border: 0;
  background: transparent;
  color: #98a2b3;
  cursor: default;
}

.progress-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 1px;
  background: #e7ebf1;
}

.progress-item i {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f2f4f7;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.progress-item span {
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.progress-item.is-active,
.progress-item.is-done {
  color: var(--apply-primary);
}

.progress-item.is-active i,
.progress-item.is-done i {
  background: #e9f3ff;
  color: var(--apply-primary);
}

.progress-item.is-done:not(:last-child)::after {
  background: #8fc3ff;
}

/* ==================================================
   3. 단계 카드
================================================== */

.apply-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--apply-line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.05);
}

.apply-step[hidden],
.apply-result[hidden] {
  display: none;
}

.step-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.step-head span {
  color: var(--apply-primary);
  font-size: 11px;
  font-weight: 900;
}

.step-head h2 {
  margin: 5px 0 5px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.step-head p {
  margin: 0;
  color: var(--apply-muted);
  font-size: 13px;
}

.step-head > strong {
  align-self: flex-start;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--apply-muted);
  white-space: nowrap;
  font-size: 11px;
}

/* ==================================================
   4. 직업 / 사건 선택 카드
================================================== */

.choice-grid {
  display: grid;
  gap: 12px;
}

.job-grid {
  grid-template-columns: repeat(3, 1fr);
}

.case-grid {
  grid-template-columns: repeat(2, 1fr);
}

.choice-card {
  min-height: 145px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #dfe5ed;
  border-radius: 17px;
  background: #ffffff;
  color: var(--apply-text);
  text-align: left;
  cursor: pointer;
  transition: 0.15s ease;
}

.choice-card:hover {
  border-color: #a9d2ff;
  background: #f8fbff;
}

.choice-card.is-selected {
  border-color: var(--apply-primary);
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.08);
}

.choice-icon {
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  margin-bottom: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: #eef2f6;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.choice-card.is-selected .choice-icon {
  background: var(--apply-primary);
  color: #ffffff;
}

.choice-card b {
  font-size: 17px;
}

.choice-card small {
  margin-top: 5px;
  color: var(--apply-muted);
  font-size: 12px;
}

.case-card {
  min-height: 165px;
}

.case-card .choice-icon {
  min-width: 50px;
}

/* ==================================================
   5. 버튼
================================================== */

.step-actions {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.primary-next,
.secondary-btn {
  min-width: 138px;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.primary-next {
  border: 0;
  background: var(--apply-primary);
  color: #ffffff;
}

.primary-next:hover:not(:disabled) {
  background: var(--apply-primary-hover);
}

.primary-next:disabled {
  background: #d7dce3;
  cursor: not-allowed;
}

.secondary-btn {
  border: 1px solid #dfe5ed;
  background: #ffffff;
  color: #475467;
}

/* ==================================================
   6. 선택 요약
================================================== */

.selection-summary {
  margin-bottom: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 28px;
  background: #f8fafc;
  border-radius: 14px;
}

.selection-summary div {
  min-width: 100px;
}

.selection-summary small,
.selection-summary b {
  display: block;
}

.selection-summary small {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 900;
}

.selection-summary b {
  margin-top: 3px;
  font-size: 13px;
}

.selection-summary button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--apply-primary);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

/* ==================================================
   7. 발급서류 목록
================================================== */

.document-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.document-row {
  padding: 15px 16px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  background: #ffffff;
}

.document-row.is-disabled {
  background: #f8fafc;
  opacity: 0.62;
}

.document-check {
  width: 22px;
  height: 22px;
  accent-color: var(--apply-primary);
  cursor: pointer;
}

.document-info b,
.document-info small {
  display: block;
}

.document-info b {
  font-size: 14px;
}

.document-info small {
  margin-top: 3px;
  color: var(--apply-muted);
  font-size: 11px;
}

.document-remove {
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: #f2f4f7;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.document-remove:hover {
  background: #feeceb;
  color: #d92d20;
}

/* ==================================================
   8. 서류 추가
================================================== */

.add-document-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed #bad9fb;
  border-radius: 15px;
  background: #f7fbff;
}

.add-document-box p {
  margin: 4px 0 14px;
  color: var(--apply-muted);
  font-size: 12px;
}

.add-document-form {
  display: flex;
  gap: 8px;
}

.add-document-form input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  outline: 0;
}

.add-document-form input:focus {
  border-color: var(--apply-primary);
  box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.08);
}

.add-document-form button {
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #172033;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

/* ==================================================
   9. 선택 완료 결과
================================================== */

.apply-result {
  padding: 28px;
  border-radius: 22px;
  background: #102b4e;
  color: #ffffff;
}

.apply-result > span {
  color: #8fc3ff;
  font-size: 11px;
  font-weight: 900;
}

.apply-result h2 {
  margin: 6px 0;
  font-size: 23px;
}

.apply-result p {
  margin: 0;
  color: #cee2fa;
  font-size: 13px;
}

.result-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.result-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  font-size: 11px;
}

#continueNextDevelopment {
  margin-top: 20px;
  border: 0;
  background: transparent;
  color: #8fc3ff;
  font-weight: 900;
  cursor: default;
}

/* ==================================================
   10. 반응형
================================================== */

@media (max-width: 900px) {
  .apply-shell {
    grid-template-columns: 1fr;
  }

  .apply-sidebar {
    display: none;
  }

  .job-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .apply-shell {
    width: 100%;
    margin: 0 0 14px;
  }

  .apply-main {
    gap: 10px;
  }

  .apply-heading {
    padding: 22px 16px 8px;
  }

  .apply-heading h1 {
    font-size: 27px;
  }

  .apply-heading p {
    font-size: 13px;
  }

  .apply-progress {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 10px 8px;
  }

  .progress-item span {
    font-size: 9px;
  }

  .progress-item i {
    width: 27px;
    height: 27px;
  }

  .progress-item:not(:last-child)::after {
    top: 13px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
  }

  .apply-card,
  .apply-result {
    padding: 20px 16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .step-head {
    flex-direction: column;
    gap: 10px;
  }

  .step-head h2 {
    font-size: 21px;
  }

  .step-head > strong {
    align-self: flex-start;
  }

  .job-grid,
  .case-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .choice-card,
  .case-card {
    min-height: 130px;
    padding: 15px;
  }

  .choice-icon {
    margin-bottom: 13px;
  }

  .choice-card b {
    font-size: 15px;
  }

  .choice-card small {
    font-size: 10px;
  }

  .selection-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .selection-summary button {
    grid-column: 1 / -1;
    margin-left: 0;
    text-align: left;
  }

  .document-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 13px;
  }

  .add-document-form {
    flex-direction: column;
  }

  .add-document-form button {
    width: 100%;
  }

  .step-actions {
    position: sticky;
    bottom: 70px;
    z-index: 20;
    padding: 9px;
    margin: 20px -6px -8px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    backdrop-filter: blur(10px);
  }

  .primary-next,
  .secondary-btn {
    min-width: 0;
    flex: 1;
  }
}

/* ==================================================
   11. STEP 3 구비서류 분류
================================================== */

.document-guide {
  margin-bottom: 18px;
  padding: 17px 18px;
  border-left: 4px solid var(--apply-primary);
  border-radius: 0 14px 14px 0;
  background: #f7fbff;
}

.document-guide h3 {
  margin: 0;
  color: var(--apply-text);
  font-size: 17px;
}

.document-guide p {
  margin: 5px 0 0;
  color: var(--apply-muted);
  font-size: 12px;
  line-height: 1.65;
}

.document-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.document-category {
  overflow: hidden;
  border: 1px solid #e0e6ee;
  border-radius: 17px;
  background: #ffffff;
}

.document-category-head {
  padding: 17px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e8ecf2;
}

.document-category-title {
  min-width: 0;
}

.document-category-title span {
  display: block;
  margin-bottom: 4px;
  color: var(--apply-primary);
  font-size: 10px;
  font-weight: 900;
}

.document-category-title h3 {
  margin: 0;
  color: var(--apply-text);
  font-size: 18px;
}

.document-category-title p {
  margin: 5px 0 0;
  color: var(--apply-muted);
  font-size: 12px;
  line-height: 1.55;
}

.category-select-all {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cfe1f6;
  border-radius: 9px;
  background: #ffffff;
  color: var(--apply-primary);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.category-select-all:hover {
  background: #eef6ff;
}

.document-category-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-row {
  border-radius: 12px;
}

.document-meta-note {
  display: block;
  margin-top: 5px;
  color: #7b8495;
  font-size: 11px;
  line-height: 1.5;
}

.document-row.is-disabled .document-meta-note {
  color: #98a2b3;
}

@media (max-width: 640px) {
  .document-guide {
    margin-left: -2px;
    margin-right: -2px;
    padding: 15px;
  }

  .document-category-head {
    padding: 15px;
    flex-direction: column;
  }

  .category-select-all {
    width: 100%;
  }

  .document-category-list {
    padding: 8px;
  }
}

/* ==================================================
   11. STEP 4 비용 확인 준비
================================================== */

#continueNextDevelopment {
  cursor: pointer;
}

#continueNextDevelopment:hover {
  color: #ffffff;
}

.cost-ready-box {
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 15px;
}

.cost-ready-box > b {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.cost-document-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cost-document-list span {
  padding: 7px 9px;
  background: #ffffff;
  border: 1px solid #dce4ed;
  border-radius: 999px;
  color: #475467;
  font-size: 11px;
}

.cost-notice {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff9eb;
  border: 1px solid #f2dfb3;
  border-radius: 13px;
  color: #745b2d;
  font-size: 12px;
  line-height: 1.6;
}
