/* ================================================================
   support.css — Bibong.dev Support(support.html · support-status.html) 전용 조각
   공통 모양(토큰·헤더·푸터·버튼·입력·하단 알림)은 core-ui.css. design-docs 기준:
     · 기능 요소는 청록 단색, 그라데이션은 쓰지 않는다 · 반경 12 · 버튼 44
================================================================ */

.sp-main { max-width: 800px; }
.sp-sub { margin: 6px 0 20px; font-size: 14px; color: var(--muted); }
.sp-label { font-size: 14px; font-weight: 600; }
.opt { font-weight: 400; font-size: 12px; color: var(--muted); }

/* 검색창: 왼쪽 돋보기, 오른쪽 × (core-ui 가 붙인다) */
.sp-search > [data-icon] { display: inline-flex; color: var(--muted); }
.sp-search > [data-icon] svg { width: 18px; height: 18px; }
.sp-search input::-webkit-search-cancel-button { display: none; }

/* 다른 화면으로 넘어가는 상자 */
.sp-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 32px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.sp-box strong { display: block; font-size: 16px; }
.sp-box span { font-size: 14px; color: var(--muted); }
.sp-box-acts { display: flex; gap: 8px; flex-wrap: wrap; }   /* 처리 상태 확인(보조) 왼쪽 · 문의 접수하기(주요) 오른쪽 */

/* 분류 칩 · 문의 유형 */
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chip, .sp-type span {
  min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); font-size: 14px; font-weight: 600; color: var(--muted);
}
.sp-chip:hover, .sp-type:hover span { color: var(--text); background: var(--surface); }
.sp-chip[aria-pressed="true"], .sp-type input:checked + span { border-color: var(--brand); color: var(--focus); background: var(--soft); }

/* 자주 묻는 질문 */
.fq-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.fq-list { border-top: 1px solid var(--border); }
.fq-item { border-bottom: 1px solid var(--border); }
.fq-item summary { list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 16px 4px; cursor: pointer; font-weight: 600; }
.fq-item summary::-webkit-details-marker { display: none; }
.fq-item summary::after {   /* 닫혀 있으면 아래, 펼치면 위 */
  content: ''; flex: none; align-self: center; width: 8px; height: 8px; margin: 0 6px 4px auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s, margin .2s;
}
.fq-item[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.fq-item summary:hover { color: var(--focus); }
.fq-q { flex: none; font-weight: 700; color: var(--focus); }
.fq-tag { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.fq-a { padding: 0 4px 20px 26px; font-size: 14px; line-height: 1.8; color: var(--muted); word-break: keep-all; }
.fq-a ol, .fq-a ul { padding-left: 18px; margin: 6px 0; }
.fq-a b { color: var(--text); }
.fq-a a { color: var(--focus); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fq-empty { padding: 40px 0; text-align: center; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--border); }
.fq-pages { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.fq-page { min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--radius); background: none;
  font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; }
.fq-page svg { width: 16px; height: 16px; }
.fq-page:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.fq-page[aria-current="page"] { border-color: var(--brand); color: var(--focus); background: var(--soft); cursor: default; }
.fq-page:disabled:not([aria-current]) { opacity: .35; cursor: default; }

/* 접수 단계 */
.sp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; padding: 0; }
.sp-step { width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 0 12px; border: 0; border-bottom: 2px solid var(--border);
  background: none; font-size: 14px; font-weight: 600; color: var(--muted); text-align: left; cursor: default; }
.sp-step-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.sp-step.is-done { color: var(--text); cursor: pointer; }
.sp-step.is-done .sp-step-num { background: var(--text); border-color: var(--text); color: var(--bg); }
.sp-step.is-now { color: var(--text); border-bottom-color: var(--brand); }
.sp-step.is-now .sp-step-num { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ① 서비스 검색 — 이름은 검색 결과나 바로 고르기로만 정한다 */
.sp-combo { position: relative; }
.sp-picked { display: inline-flex; color: var(--focus); padding: 0 8px; }
.sp-combo.is-picked .input-shell { border-color: var(--brand); }
.sp-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; list-style: none; margin: 0; padding: 6px;
  max-height: 320px; overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-h); }
.sp-opt { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.sp-opt.on { background: var(--soft); color: var(--focus); }
.sp-opt .sp-svc-desc { margin-left: auto; text-align: right; }
.sp-none { padding: 12px; font-size: 14px; color: var(--muted); }
.sp-quick-label { margin: 24px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sp-svcs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sp-svcs .sp-svc { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 14px 16px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.sp-svcs .sp-svc:hover { background: var(--surface); }
.sp-svcs .sp-svc[aria-pressed="true"] { border-color: var(--brand); background: var(--soft); }
.sp-svc-name { font-size: 14px; font-weight: 600; }
.sp-svc-desc { font-size: 12px; color: var(--muted); }

/* ② 문의 내용 */
.sp-types { margin-bottom: 20px; gap: 8px; }
.sp-types legend { width: 100%; margin-bottom: 8px; }
.sp-type { position: relative; cursor: pointer; }
.sp-type input { position: absolute; opacity: 0; width: 0; height: 0; }
.sp-type input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.sp-area { position: relative; }
.sp-area textarea { display: block; width: 100%; min-height: 220px; padding: 12px 48px 12px 16px; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); font-size: 14px; line-height: 1.7; }
.sp-area textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sp-area textarea[aria-invalid="true"] { border-color: var(--error); }
.sp-area .icon-button { position: absolute; top: 4px; right: 4px; width: 36px; min-width: 36px; height: 36px; color: var(--muted); }
.sp-area .icon-button svg { width: 16px; height: 16px; }
.sp-area-foot { display: flex; justify-content: space-between; gap: 12px; }
.sp-count { flex: none; font-variant-numeric: tabular-nums; }
.sp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; text-align: center; cursor: pointer;
  border: 1px dashed var(--border); border-radius: var(--radius); font-size: 14px; }
.sp-drop:hover, .sp-drop.is-over { border-color: var(--brand); background: var(--soft); }
.sp-drop small { font-size: 12px; color: var(--muted); }
.sp-files { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.sp-files:empty { display: none; }
.sp-file { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: 14px; }
.sp-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-file-size { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-file .icon-button { width: 36px; min-width: 36px; height: 36px; color: var(--muted); }
.sp-file .icon-button svg { width: 16px; height: 16px; }

/* ③ 접수자 확인 */
.sp-me { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.sp-me-av { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.sp-me-who { flex: 1; min-width: 0; }
.sp-me-name { font-weight: 700; }
.sp-me-mail { font-size: 14px; overflow-wrap: anywhere; }
.sp-me-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sp-row2 .field + .field { margin-top: 0; }
.sp-agree { margin-top: 20px; padding: 4px 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.sp-agree .check-line + .check-line { border-top: 1px solid var(--border); }
.sp-agree-all { font-weight: 600; }
.sp-agree small { display: block; font-size: 12px; color: var(--muted); }
.sp-alt { margin-top: 12px; font-size: 14px; color: var(--muted); }
.sp-alt a, .sp-alt button { padding: 0; border: 0; background: none; font-weight: 600; color: var(--focus); }
.sp-alt a:hover, .sp-alt button:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 20px 0 0; padding: 16px; border-radius: var(--radius);
  background: var(--surface); font-size: 14px; }
.sp-summary dt { color: var(--muted); }
.sp-summary dd { margin: 0; overflow-wrap: anywhere; }
#csNext { margin-left: auto; }   /* 이전 단추가 없는 첫 단계에서도 실행은 오른쪽 */

/* 접수 완료 */
.sp-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center; }
.sp-done-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; margin-bottom: 8px; }
.sp-done-icon svg { width: 24px; height: 24px; }
.sp-done p b { color: var(--text); overflow-wrap: anywhere; }
.sp-ref { display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; padding: 6px 6px 6px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sp-ref strong { font-size: 18px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.sp-ref .button { min-height: 36px; padding: 0 12px; }
.sp-done > .button { margin-top: 16px; }

/* 처리 상태 조회 */
.st-tabs { display: grid; grid-template-columns: 1fr 1fr; max-width: 360px; gap: 4px; padding: 4px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.st-tab { min-height: 40px; border: 0; border-radius: calc(var(--radius) - 4px); background: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.st-tab:hover { color: var(--text); }
.st-tab[aria-selected="true"] { background: var(--panel); color: var(--focus); box-shadow: 0 0 0 1px var(--border); }
#csId { text-transform: uppercase; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
/* 비회원 접수: 왼쪽 조회 양식 · 오른쪽 조회 결과(한 건 보기를 작게) — 800px 이하에서는 위아래로 */
.st-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.st-panel { padding: 28px; }
.st-panel.is-empty { display: flex; align-items: center; justify-content: center; align-self: stretch; }
.st-panel-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 280px; text-align: center; font-size: 14px; color: var(--muted); word-break: keep-all; }
.st-panel-empty svg { width: 28px; height: 28px; }
.st-panel .sp-article-head { padding-bottom: 16px; }
.st-panel .sp-article-head h2 { font-size: 20px; }
.st-panel .sp-article-head time { font-size: 13px; }
.st-panel .sp-body { padding-top: 16px; font-size: 15px; line-height: 1.7; }
.st-form .button.primary { width: 100%; margin-top: 24px; }
.st-attach { margin-top: 16px; }
.st-reply { margin-top: 24px; padding: 16px; border-radius: var(--radius); background: var(--surface); border-left: 3px solid var(--brand); }
.st-info { margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.st-info > div { display: flex; gap: 12px; }
.st-info dt { flex: none; width: 88px; color: var(--muted); }
.st-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.st-reply.is-done { border-left-color: var(--success); }
.st-reply.is-rejected { border-left-color: var(--error); }
.st-reply.is-more_info { border-left-color: var(--warning); }
.st-reply.is-mine { border-left-color: var(--border); }
.st-reply + .st-reply { margin-top: 12px; }
.st-msg-form { margin-top: 24px; display: flex; flex-direction: column; gap: 6px; }
.st-msg-form label { font-size: 14px; font-weight: 600; }
.st-msg-form .sp-area { position: relative; }
.st-msg-form .sp-area textarea { min-height: 120px; }
.st-msg-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.st-reply-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.st-reply-body { font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 600px) {
  .sp-row2, .sp-svcs { grid-template-columns: 1fr; }
  .sp-step { font-size: 0; gap: 0; justify-content: center; }
  .sp-step.is-now { font-size: 12px; gap: 8px; }
  .sp-me { flex-wrap: wrap; }
  .sp-me-acts { width: 100%; justify-content: flex-start; }
  .sp-box .button, .sp-box-acts { width: 100%; }
  .sp-box-acts .button { flex: 1 1 0; width: auto; }
  .sp-bar, .st-bar { flex-wrap: wrap; }
}
@media (max-width: 800px) {
  .st-split { grid-template-columns: 1fr; }
  .st-panel.is-empty { padding: 32px 24px; }
}

/* reCAPTCHA 안내 — 배지 대신 문구로(접수는 App Check 를 거친다) */
.grecaptcha-badge { visibility: hidden; }
.sp-recaptcha { margin-top: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.sp-recaptcha a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
