@charset "utf-8";

/* ============================================================
   비급여 수가표 — templates/template-yb-price.php
   마크업 sections/yb-price.php · 데이터 inc/price-table.php

   .tbl-* 는 네이밍 가이드의 테이블 컴포넌트다. 지금은 이 페이지에서만 쓰므로
   여기 두고, 표가 한 곳 더 생기면 뼈대만 ui.css 로 옮긴다
============================================================ */

.sec-price {
  --tbl-line   : #e5e5e5;
  --tbl-head-bg: #333;
  --tbl-pd-x   : var(--one-gap-xl);

  /* 시안은 같은 분류 안의 행이 줄간격만큼만 떨어져 있다(글자 크기의 1.83배).
     숨통은 분류 묶음 경계에서만 틔운다 */
  --tbl-pd-y   : var(--one-gap-sm);
  --tbl-pd-grp : var(--one-gap-r);
}

.sec-price-tit { margin-bottom: var(--one-space-r); }


/* ── 표 ── */

/* 좁아지면 표 모양을 유지한 채 가로로 스크롤된다 */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 맨 아래 줄은 표가 그린다 — 마지막 행에 줄을 주면
   rowspan 으로 내려온 분류 칸이 빠져 왼쪽이 뚫린다 */
/* 표·안내문의 폭을 한 곣에서 정한다 — .tbl 에 걸면 안내문이 같이 안 줄어든다 */
.tbl-box {
  max-width: 1200px;
  margin: 0 auto;
}

.tbl {
  width: 100%;
  min-width: 700px;
  border-bottom: 1px solid var(--tbl-line);
  table-layout: fixed;
}

.tbl-col-cate { width: 22%; }
.tbl-col-item { width: 46%; }
.tbl-col-amt  { width: 32%; }

.tbl-th {
  padding: var(--one-gap-lg) var(--tbl-pd-x);
  background-color: var(--tbl-head-bg);
  color: var(--white-color);
  font-size: var(--one-p-tit);
  font-weight: 500;
  text-align: center;
}

.tbl-th-note {
  font-size: var(--one-caption);
  font-weight: 400;
}

.tbl-td {
  padding: var(--tbl-pd-y) var(--tbl-pd-x);
  vertical-align: top;
  font-weight: 500;
}

/* 분류 — rowspan 으로 묶인 왼쪽 칸. 세로선은 오른쪽에만 */
.tbl-cate {
  border-right: 1px solid var(--tbl-line);
  color: var(--one-txt-color);
  font-weight: 400;
  text-align: center;
}

.tbl-amt { border-left: 1px solid var(--tbl-line); }

/* 가격이 항목당 여러 줄인 자리가 있다 (전문가 치아 미백 등) — 행 간격과 같은 수준 */
.tbl-amt-line + .tbl-amt-line { margin-top: var(--one-gap-sm); }

/* 괄호 부가설명 — 항목명·금액 뒤에 회색 작은 글씨 */
.tbl-note {
  margin-left: var(--one-gap-xs);
  color: var(--gray-color01);
  font-size: var(--one-caption);
  font-weight: 400;
}

/* 분류 묶음(tbody)의 첫 행·마지막 행에서만 여백을 준다 */
.tbl-body > .tbl-row:first-child > .tbl-td { padding-top: var(--tbl-pd-grp); }
.tbl-body > .tbl-row:last-child  > .tbl-td { padding-bottom: var(--tbl-pd-grp); }

/* 분류가 바뀌는 선 — 세 칸 모두 */
.tbl-body + .tbl-body > .tbl-row:first-child > .tbl-td {
  border-top: 1px solid var(--tbl-line);
}

/* 분류 안에서 끊는 선 — 분류 칸은 rowspan 이라 두 칸만.
   앞 행의 아래 여백은 CSS 로 못 잡아 섹션이 .is-sep-end 를 찍어 준다 */
.tbl-row.is-sep > .tbl-td {
  padding-top: var(--tbl-pd-grp);
  border-top: 1px solid var(--tbl-line);
}

.tbl-row.is-sep-end > .tbl-td { padding-bottom: var(--tbl-pd-grp); }


/* ── 표 아래 안내문 ── */

.tbl-help {
  margin-top: var(--one-gap-xl);
  color: var(--gray-color01);
  font-size: var(--one-caption);
}

.tbl-help-line + .tbl-help-line { margin-top: var(--one-gap-xs); }


/* ============================
   반응형 — 태블릿
============================ */

@media all and (max-width: 1024px) {

  .sec-price-tit { margin-bottom: var(--one-space-s); }
}


/* ============================
   반응형 — 모바일
============================ */

@media all and (max-width: 639px) {

  .sec-price { --tbl-pd-x: var(--one-gap-sm); }

  /* 표 모양은 그대로 두고 세 칸을 화면 안에 넣는다 —
     min-width 를 두면 가격 칸이 오른쪽으로 밀려 안 보인다 */
  .tbl { min-width: 0; }

  .tbl-col-item { width: 42%; }
  .tbl-col-amt  { width: 36%; }

  .tbl-th { font-size: var(--one-body); }

  .tbl-td {
    font-size: var(--one-body);
    overflow-wrap: break-word;   /* Comprehensive 처럼 긴 영단어가 칸을 넘지 않게 */
  }

  /* 부가설명을 아랫줄로 내린다 — 한 줄에 붙여 두면 칸이 밀려 가격이 잘린다 */
  .tbl-note {
    display: block;
    margin-left: 0;
  }
}
