/* 데이터개방포털 데이터 검색·데이터 개방 (퍼블리싱 v5 data-open 기준, pt-ds- 접두어) */
.pt-ds { display: flex; flex-direction: column; gap: 24px; }

/* ---------- 카테고리 표 ---------- */
.pt-ds-label { margin: 0 0 8px; font-size: 14px; font-weight: 700; line-height: 24px; color: #9F9FA9; }
.pt-ds-hint { margin-left: 8px; font-size: 12px; font-weight: 500; color: #A1A1AA; }
.pt-ds-cat { overflow: hidden; border: 1px solid #E4E4E7; border-radius: 4px; }
.pt-ds-cat-head,
.pt-ds-cat-row { display: flex; gap: 20px; padding: 0 20px; }
.pt-ds-cat-head { background: #FAFAFA; border-bottom: 1px solid #E4E4E7; }
.pt-ds-cat-head > div { padding: 10px 0; font-size: 14px; font-weight: 600; color: #09090B; }
.pt-ds-cat-row { border-bottom: 1px solid #E4E4E7; }
.pt-ds-cat-row:last-child { border-bottom: 0; }
.pt-ds-col-cls { width: 140px; flex-shrink: 0; border-right: 1px solid #E4E4E7; }
.pt-ds-col-kwd { width: 334px; flex-shrink: 0; border-right: 1px solid #E4E4E7; }
.pt-ds-col-div { flex: 1; min-width: 0; }
.pt-ds-cat-row > div {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    align-content: start;
    gap: 16px 12px;
    padding: 20px 0;
}
.pt-ds-cat-row > .pt-ds-col-cls { grid-template-columns: 1fr; }
.pt-ds-check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.pt-ds-check input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
    accent-color: #2563EB;
    cursor: pointer;
}
.pt-ds-check span { font-size: 14px; line-height: 19px; color: #000; }
.pt-ds-check input:checked + span,
.pt-ds-check input:indeterminate + span { font-weight: 700; }

/* ---------- 검색 조건 ---------- */
.pt-ds-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.pt-ds-filter { display: flex; align-items: center; gap: 12px; }
.pt-ds-filter > label { font-size: 14px; font-weight: 700; color: #9F9FA9; white-space: nowrap; }
.pt-ds-select {
    min-width: 150px;
    height: 32px;
    padding: 4px 28px 4px 8px;
    border: 1px solid #E4E4E7;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    font-size: 12px;
    color: #09090B;
    cursor: pointer;
    background: #FAFAFA url('../../images/portal/caret-down.svg') right 8px center / 12px no-repeat;
}
.pt-ds-select-sm { min-width: 107px; width: 107px; }
.pt-ds-search { gap: 4px; }
.pt-ds-search > label { margin-right: 12px; }
.pt-ds-input {
    width: 200px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #E4E4E7;
    border-radius: 4px;
    font-size: 12px;
    color: #09090B;
    background: #FAFAFA;
}
.pt-ds-input::placeholder { color: #9F9FA9; }
.pt-ds-select:focus,
.pt-ds-input:focus { outline: 2px solid #BFDBFE; border-color: #2563EB; }
.pt-ds-btn-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 16px 0 12px;
    border: 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #2563EB;
    cursor: pointer;
    transition: background .2s;
}
.pt-ds-btn-search:hover { background: #1d4ed8; }

/* ---------- 결과 ---------- */
.pt-ds-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 2px solid #09090B;
}
.pt-ds-result-head p { margin: 0; font-size: 15px; color: #52525C; }
.pt-ds-result-head strong { font-size: 18px; font-weight: 700; color: #2563EB; }
.pt-ds-reset {
    padding: 6px 12px;
    border: 1px solid #E4E4E7;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #52525C;
    background: #fff;
    cursor: pointer;
}
.pt-ds-reset:hover { background: #F4F4F5; }

.pt-ds-list { display: flex; flex-direction: column; gap: 12px; }
.pt-ds-empty { padding: 60px 0; text-align: center; font-size: 14px; color: #71717B; border: 1px solid #E4E4E7; border-radius: 8px; }
.pt-ds-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px;
    border: 1px solid #E4E4E7;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.pt-ds-card:hover { border-color: #BFDBFE; box-shadow: 0 6px 18px rgba(37, 99, 235, .08); }
.pt-ds-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pt-ds-title {
    padding: 0;
    border: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    color: #09090B;
    background: none;
    cursor: pointer;
}
.pt-ds-title:hover { color: #2563EB; text-decoration: underline; }
.pt-ds-code { font-size: 12px; font-weight: 600; color: #71717B; }
.pt-ds-desc { margin: 0; font-size: 14px; line-height: 1.6; color: #3F3F46; word-break: keep-all; }
.pt-ds-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 24px;
    margin: 4px 0 0;
    padding: 14px 16px;
    border-radius: 4px;
    background: #FAFAFA;
}
.pt-ds-meta div { display: flex; gap: 10px; min-width: 0; font-size: 13px; }
.pt-ds-meta dt { flex-shrink: 0; width: 72px; font-weight: 600; color: #71717B; }
.pt-ds-meta dd { margin: 0; overflow: hidden; color: #09090B; white-space: nowrap; text-overflow: ellipsis; }
.pt-ds-actions { display: flex; justify-content: flex-end; }
.pt-ds-btn {
    padding: 8px 16px;
    border: 1px solid #2563EB;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #2563EB;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
}
.pt-ds-btn:hover { color: #fff; background: #2563EB; }
/* 실버 데이터가 아직 없는 데이터셋 — '데이터 준비 중' */
.pt-ds-badge-notready {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #71717B;
    background: #F4F4F5;
}
.pt-ds-card.is-notready .pt-ds-title { color: #71717B; }
.pt-ds-btn.is-disabled,
.pt-ds-btn.is-disabled:hover { border-color: #E4E4E7; color: #A1A1AA; background: #fff; cursor: not-allowed; }

/* 페이지 번호(공용 Pagination이 만든 버튼을 퍼블리싱 모양으로) */
.pt-ds-paging #paging button {
    width: 32px;
    height: 32px;
    border: 1px solid #E4E4E7;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #09090B;
    background: #fff;
}
.pt-ds-paging #paging button:not(:disabled):hover { background: #F4F4F5; }
.pt-ds-paging #paging button[class*="03428E"] { color: #2563EB; font-weight: 700; border-color: #2563EB; background: #EFF6FF; }

/* ---------- 반응형 ---------- */
@media (max-width: 1280px) {
    .pt-ds-col-kwd { width: 260px; }
}
@media (max-width: 1024px) {
    .pt-ds-filters { flex-direction: column; align-items: stretch; }
    .pt-ds-filter { width: 100%; }
    .pt-ds-select { flex: 1; }
    .pt-ds-search .pt-ds-input { flex: 1; width: auto; }
    .pt-ds-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .pt-ds-cat-head { display: none; }
    .pt-ds-cat-row { flex-direction: column; gap: 0; padding: 0 16px; }
    .pt-ds-col-cls, .pt-ds-col-kwd { width: auto; border-right: 0; }
    .pt-ds-cat-row > div { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 0; border-bottom: 1px dashed #F4F4F5; }
    .pt-ds-cat-row > div:last-child { border-bottom: 0; }
    .pt-ds-cat-row > div::before {
        content: attr(data-label);
        grid-column: 1 / -1;
        font-size: 12px;
        font-weight: 700;
        color: #9F9FA9;
    }
    .pt-ds-filter { flex-wrap: wrap; gap: 8px; }
    .pt-ds-filter > label { width: 100%; }
    .pt-ds-search > label { margin-right: 0; }
    .pt-ds-card { padding: 16px; }
    .pt-ds-meta { grid-template-columns: 1fr; }
}
