/**
 * 서비스 소개 > 전체 생활법령 보기 (UI-A-06-01-02, 설계서 UI-A-06-02) — 임시 스타일 (공식 퍼블 대기).
 *
 * 퍼블 재사용: .sub_top / .nav_box / .page_title / .sub_content / .btn_box / .sub_btn
 * 대분류·소분류 표는 전용 퍼블이 없어 kebab-case(all-laws-*) 커스텀으로 둔다(퍼블 CSS 무수정).
 *
 * 대분류 색상 그룹(설계서 Description 1)은 AS-IS ViewCsmCate.jsp 의 색을 그대로 승계한다.
 *   보라 #605fb2 / 핑크 #e4007f / 주황 #f39800 / 녹색 #009d85 / 회색 #9fa5ab
 * 색상 판정(대분류 → 그룹)은 서버(AllLawsServiceImpl)가 하고, 여기서는 그룹별 색만 정의한다.
 */

#contents:has(> .all-laws) {
    padding-bottom: var(--row-gap-md);
}

.all-laws {
    display: flex;
    flex-direction: column;
    gap: var(--row-gap-sl);
}

/* 분류 표 — 좌측 대분류 색상 셀 + 우측 소분류 그리드 */
.all-laws-table {
    border: 1px solid var(--gray-30);
    border-radius: var(--radius-08);
    overflow: hidden;
}

.all-laws-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    border-top: 1px solid var(--gray-30);
}

.all-laws-row:first-child {
    border-top: 0;
}

/* 대분류 셀 — 행별 색 구분(.is-purple 등)을 없애고 한 색으로 통일 */
.all-laws-cate {
    display: flex;
    align-items: center;
    padding: clamp(12px, 1.6vw, 18px);
    background: var(--primary-5, #f0f6ff);
}

.all-laws-cate > a {
    font-size: var(--text-17);
    font-weight: 700;
    color: var(--primary-60, #155eef);
    line-height: 1.4;
    word-break: keep-all;
}

.all-laws-cate > a:hover,
.all-laws-cate > a:focus-visible {
    text-decoration: underline;
}

/* 소분류 — 1줄 4개, 항목 수에 따라 행 높이 가변 (설계서 Description 2) */
.all-laws-laws {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem clamp(10px, 1.5vw, 20px);
    padding: clamp(12px, 1.6vw, 18px);
    background: var(--gray-0);
}

.all-laws-laws > li {
    position: relative;
    padding-left: 0.7rem;
}

.all-laws-laws > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gray-60);
}

.all-laws-laws > li > a {
    font-size: var(--text-16);
    color: var(--gray-90);
    line-height: 1.6;
    word-break: keep-all;
}

.all-laws-laws > li > a:hover,
.all-laws-laws > li > a:focus-visible {
    color: var(--primary-text);
    text-decoration: underline;
}

.all-laws-laws > li.all-laws-empty {
    grid-column: 1 / -1;
    padding-left: 0;
    font-size: var(--text-16);
    color: var(--gray-70);
}

.all-laws-laws > li.all-laws-empty::before {
    content: none;
}

.all-laws-btn-box {
    margin-top: 0;
}

@media screen and (max-width: 1024px) {

    .all-laws-laws {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 768px) {

    .all-laws-row {
        grid-template-columns: 1fr;
    }

    .all-laws-laws {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 480px) {

    .all-laws-laws {
        grid-template-columns: 1fr;
    }
}
