/* =========================================================================
   공용 테이블 시스템 (.tbl) — 검진(health) 화면 점진 개편용.
   전역 table th/td 스타일(basic.css)을 스코프 안에서 리셋하고 깔끔한 카드형 테이블 제공.
   class="tbl" 로 opt-in — 기존 <table>/.table 은 영향 없음.
   포인트색은 검진 파란(--blue) 계열. (메디챗은 별도 medichat-basic.css .tbl / 보라 계열)
   ========================================================================= */

.tbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--gray-30);
    border-radius: 12px;
    table-layout: fixed;
    overflow: hidden;
}

/* 전역 table th/td 의 4면 테두리(basic.css)를 먼저 리셋 — 이 규칙이 아래 border-bottom 보다 앞서야 함 */
.tbl thead th,
.tbl tbody td {
    border: none;
    background: #fff;
}

.tbl thead th {
    background: var(--gray-10);
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-60);
    text-align: center;
    border-bottom: 1px solid var(--gray-30);
}

.tbl tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--gray-70);
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-20);
}

.tbl tbody tr:last-child td { border-bottom: none; }

.tbl tbody tr { transition: background 0.12s ease; }
.tbl tbody tr[onclick] { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--gray-10); }

/* 셀 정렬 옵션 — th/td 에 붙임 */
.tbl-left  { text-align: left !important; }
.tbl-right { text-align: right !important; }

/* 셀 안 뱃지 — 배경/색은 인라인으로 지정 (상태별 색상은 화면 로직이 결정) */
.tbl-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* 아이콘 + 이름 셀 (병원명 등) */
.tbl-namecell { display: flex; align-items: center; gap: 8px; }
.tbl-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
}

/* 리스트 상단 검색바 */
.tbl-searchbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.tbl-searchbox {
    display: flex; align-items: center;
    flex: 1; max-width: 480px; height: 44px; padding: 0 14px;
    background: #fff; border: 1px solid var(--gray-30); border-radius: 10px;
}
/* 전역 input:not([radio]):not([checkbox]) (basic.css) 가 border/height/radius 를 강제하므로
   같은 형태 셀렉터로 우선순위를 맞춰 덮어씀 — 안 그러면 검색창 안에 input 박스가 이중으로 생김 */
.tbl-searchbox input:not([type="radio"]):not([type="checkbox"]) {
    border: none; border-radius: 0; outline: none;
    height: 100%; width: 100%; padding: 0; margin: 0 0 0 10px;
    font-size: 14px; background: transparent;
}
/* 검색바 버튼 — 아이콘+텍스트 정렬, 검색창 높이(44px)에 맞춤 */
.tbl-searchbtn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 10px; }

/* 페이지네이션 — active 는 검진 파란색 */
.tbl-paging { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.tbl-paging button {
    min-width: 34px; padding: 8px 10px;
    border-radius: 8px; border: 1px solid var(--gray-30);
    background: #fff; color: var(--gray-70); cursor: pointer; font-size: 13px;
}
.tbl-paging button:hover { background: var(--gray-10); }
.tbl-paging button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
