
/* =========================================
   1. GLOBAL & BACKGROUND
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 24px 16px 12px;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;
    color: #000;

    /* BACKGROUND WEBSITE */
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.60),
            rgba(255, 255, 255, 0.85)
        ),
        url("./bg.png");

    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-color: #fff;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}


/* =========================================
   2. HEADER SNPD
========================================= */

.search-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
    margin-bottom: 22px;
}

.search-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-logo {
    width: 55px;
    height: 55px;
    display: block;
    object-fit: contain;
}

.search-label {
    font-size: 20px;
    font-weight: bold;
    font-style: italic;
    white-space: nowrap;
}


/* =========================================
   3. KOLOM PENCARIAN
========================================= */

#search {
    flex: 1;
    min-width: 0;
    height: 45px;
    padding: 8px 12px;

    border: 4px solid #000;
    border-radius: 0;

    background: #fff;
    color: #000;

    font-family: Arial, sans-serif;
    font-size: 15px;
    font-style: italic;
}

#search::placeholder {
    color: #888;
    opacity: 1;
}

#search:focus {
    outline: 2px solid #777;
    outline-offset: 2px;
}


/* =========================================
   4. FILTER MULTI CHECKBOX
========================================= */

.filter-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 15px;
    font-weight: bold;
    font-style: italic;
    white-space: nowrap;
}

.multi-select {
    position: relative;
    width: 100%;
    max-width: 350px;
    min-width: 0;
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    min-height: 42px;
    padding: 8px 12px;

    border: 3px solid #000;
    border-radius: 0;

    background: #fff;
    color: #000;

    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.filter-toggle:disabled {
    opacity: 0.6;
    cursor: wait;
}

#filterText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-options {
    position: absolute;
    top: calc(100% - 3px);
    left: 0;
    z-index: 100;

    width: 100%;
    max-height: 270px;
    overflow-y: auto;

    border: 3px solid #000;
    background: #fff;

    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.filter-options[hidden] {
    display: none;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
}

.filter-option:hover {
    background: #eee;
}

.filter-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;

    accent-color: #000;
    cursor: pointer;
}


/* =========================================
   5. TOMBOL RESET
========================================= */

.reset-filter {
    height: 42px;
    padding: 0 20px;

    border: 3px solid #000;
    border-radius: 0;

    background: #000;
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;

    cursor: pointer;
}

.reset-filter:hover {
    background: #444;
}


/* =========================================
   6. DETAIL HASIL PENCARIAN
========================================= */

#results {
    display: grid;
    width: 100%;
    gap: 12px;
}

.result {
    width: 100%;
    padding: 4px 6px;

    border: 4px solid #000;
    background: rgba(255, 255, 255, 0.92);

    overflow-wrap: anywhere;
}

.field {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 8px;
    align-items: start;

    font-size: 18px;
    line-height: 1.6;
}

.field-label {
    font-weight: bold;
    font-style: italic;
}

.status {
    width: 100%;
    margin-top: 8px;
    font-size: 14px;
}


/* =========================================
   7. BAGIAN UNDANG-UNDANG
========================================= */

.law-section {
    width: 100%;
    min-width: 0;
    margin-top: 35px;
}

.law-section h2 {
    margin: 0 0 14px;
    padding-bottom: 8px;

    border-bottom: 4px solid #000;

    font-size: 23px;
    font-weight: bold;
    font-style: italic;
}


/* =========================================
   8. TABEL UNDANG-UNDANG
========================================= */

.table-container {
    width: 100%;
    overflow-x: auto;
    border: 3px solid #000;
}

.law-table {
    width: 100%;
    border-collapse: collapse;

    font-size: 15px;
    background: rgba(255, 255, 255, 0.93);
}

.law-table th,
.law-table td {
    padding: 11px 12px;

    border: 1px solid #000;
    text-align: left;
    vertical-align: top;
}

.law-table th {
    background: rgba(232, 232, 232, 0.96);
    font-weight: bold;
    white-space: nowrap;
}

.law-table tbody tr:nth-child(even) {
    background: rgba(245, 245, 245, 0.8);
}

.law-table tbody tr:hover {
    background: rgba(220, 220, 220, 0.95);
}

.table-status {
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 14px;
}


/* =========================================
   9. FOOTER SNPD
========================================= */

.site-footer {
    width: 100%;
    margin: 8px auto 0;
    padding: 6px 10px 10px;

    text-align: center;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-style: italic;
    font-weight: normal;

    color: #888;
}


/* =========================================
   10. RESPONSIVE TABLET
========================================= */

@media (max-width: 900px) {

    .search-row {
        gap: 12px;
    }

    .search-logo {
        width: 45px;
        height: 45px;
    }

    .field {
        grid-template-columns: 180px minmax(0, 1fr);
        font-size: 16px;
    }

    .law-table {
        font-size: 14px;
    }
}


/* =========================================
   11. RESPONSIVE MOBILE
========================================= */

@media (max-width: 600px) {

    body {
        padding: 16px 10px 8px;
        background-attachment: scroll;
    }

    .search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 18px;
    }

    .search-brand {
        gap: 10px;
    }

    .search-label {
        font-size: 18px;
    }

    #search {
        flex: none;
        width: 100%;
        height: 42px;
        font-size: 14px;
    }

    .filter-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-title {
        width: 100%;
    }

    .multi-select {
        flex: 1;
        max-width: none;
    }

    .reset-filter {
        padding: 0 12px;
    }

    .field {
        grid-template-columns: 145px minmax(0, 1fr);
        gap: 5px;
        font-size: 15px;
    }

    .law-section {
        margin-top: 25px;
    }

    .law-section h2 {
        font-size: 19px;
    }

    .law-table {
        font-size: 13px;
    }

    .law-table th,
    .law-table td {
        padding: 8px;
    }

    .site-footer {
        margin-top: 6px;
        padding: 5px 8px 8px;
        font-size: 11px;
    }
}