/*
    다국어 주제별 법령정보 목록 (UI-A-09-01-01)

    intl-main.css 토큰(.intl-shell / .intl-sub-heading / .intl-breadcrumb / .intl-select /
    .intl-sr-only / .intl-empty)을 재사용한다. 논리 속성으로 RTL 대응.
*/

.intl-theme-law__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.intl-theme-law__heading-main {
    min-width: 0;
    flex: 1 1 auto;
}

.intl-theme-law__lang {
    flex: 0 0 auto;
    padding-block-end: 4px;
}

.intl-theme-law {
    padding-block: 8px 64px;
}

/* 3축 탭 */
.intl-theme-law__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block-end: 28px;
    border-block-end: 1px solid #dfe4ec;
}

.intl-theme-law__tabs a {
    position: relative;
    padding: 12px 18px;
    color: #646e81;
    font-weight: 600;
    text-decoration: none;
}

.intl-theme-law__tabs a.is-current,
.intl-theme-law__tabs a:hover,
.intl-theme-law__tabs a:focus-visible {
    color: #2266df;
}

.intl-theme-law__tabs a.is-current::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 3px;
    background: #246beb;
    border-radius: 2px 2px 0 0;
}

/* ① 주제 분류 */
.intl-theme-law__topic-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    /* 수정요청서 20261104 02: 분류명 길이·줄 수와 관계없이 카드 높이 통일.
       1fr 행은 모든 행을 가장 높은 카드(가장 긴 분류명) 높이에 맞춘다. 글자 잘림 없음 */
    grid-auto-rows: 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.intl-theme-law__topic-grid > li {
    display: flex;
}

.intl-theme-law__topic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 112px;
    padding: 14px 8px;
    border: 1px solid #dfe4ec;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    cursor: pointer;
    text-align: center;
}

.intl-theme-law__topic:hover,
.intl-theme-law__topic:focus-visible,
.intl-theme-law__topic.is-current {
    border-color: #246beb;
    background: #e7f2ff;
    color: #2266df;
}

.intl-theme-law__topic-icon {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
}

.intl-theme-law__topic-icon img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.intl-theme-law__topic strong {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: keep-all;
}

/* ② 검색 */
.intl-theme-law__search {
    margin-block: 28px;
    padding: 18px 20px;
    border: 1px solid #dfe4ec;
    border-radius: 12px;
    background: #f7f9fc;
}

.intl-theme-law__search h2 {
    margin: 0 0 10px;
    color: #172033;
    font-size: .95rem;
}

.intl-theme-law__search form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.intl-theme-law__search input[type="search"] {
    flex: 1 1 240px;
    min-width: 0;
    height: 44px;
    padding-inline: 14px;
    border: 1px solid #c5cedb;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.intl-theme-law__btn-search,
.intl-theme-law__btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 44px;
    padding-inline: 16px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.intl-theme-law__btn-search {
    background: #246beb;
    color: #fff;
}

.intl-theme-law__btn-search:hover,
.intl-theme-law__btn-search:focus-visible {
    background: #1a5ad0;
}

.intl-theme-law__btn-reset {
    background: #fff;
    border-color: #c5cedb;
    color: #172033;
}

.intl-theme-law__btn-reset:hover,
.intl-theme-law__btn-reset:focus-visible {
    border-color: #246beb;
    color: #2266df;
}

/* ③ 결과 */
.intl-theme-law__result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 14px;
}

.intl-theme-law__result-head h2 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
}

.intl-theme-law__result-head h2 strong {
    margin-inline-start: 6px;
    color: #2266df;
}

.intl-theme-law__list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-block-start: 1px solid #dfe4ec;
}

.intl-theme-law__item {
    position: relative;
    border-block-end: 1px solid #e8edf4;
}

.intl-theme-law__item > a {
    display: block;
    padding: 16px 8px;
    color: #172033;
    font-weight: 600;
    text-decoration: none;
}

.intl-theme-law__item > a:hover,
.intl-theme-law__item > a:focus-visible {
    color: #2266df;
}

/* 마우스오버 말풍선 (설계서 3-2) */
.intl-theme-law__tip {
    display: none;
    position: absolute;
    z-index: 5;
    inset-inline-start: 8px;
    top: calc(100% - 4px);
    width: min(420px, calc(100% - 16px));
    padding: 14px 16px;
    border-radius: 12px;
    background: #172033;
    color: #fff;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .2);
}

.intl-theme-law__tip::before {
    content: "";
    position: absolute;
    inset-inline-start: 24px;
    top: -6px;
    border: 6px solid transparent;
    border-bottom-color: #172033;
    border-top-width: 0;
}

.intl-theme-law__tip strong {
    display: block;
    margin-block-end: 6px;
    font-size: .9rem;
}

.intl-theme-law__tip p {
    margin: 0;
    color: #d7dde8;
    font-size: .82rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.intl-theme-law__item:hover .intl-theme-law__tip,
.intl-theme-law__item:focus-within .intl-theme-law__tip {
    display: block;
}

.intl-theme-law__empty {
    padding: 40px 12px;
    text-align: center;
    color: #646e81;
}

.intl-theme-law__paging {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-block-start: 24px;
}

.intl-theme-law__page-size {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    color: #646e81;
    font-size: .9rem;
}
@media (max-width: 960px) {
    .intl-theme-law__topic-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .intl-theme-law__heading {
        flex-direction: column;
        align-items: stretch;
    }

    .intl-theme-law__lang {
        align-self: flex-end;
    }

    .intl-theme-law__topic-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .intl-theme-law__tip {
        display: none !important;
    }

    .intl-theme-law__paging {
        grid-template-columns: minmax(0, 1fr);
    }
}
