/**********************************/
/* @since 01/01/2025              */
/* @author K10s Open Source Team  */
/**********************************/

/* SetUp Grid */
.search-header { grid-area: header; }
.search-header-section2 { grid-area: header2; }
.search-header-section3 { grid-area: header3; }
.nav { grid-area: nav; }
.search-main { grid-area: main; }
.footer { grid-area: footer; }

.search-body {
    display: grid;
    grid-template-areas:
        'nav header'
        'nav main'
        'footer footer';
    grid-template-columns: 1fr 9fr;
    grid-template-rows: 1fr 10fr 0.5fr;
    gap: 16px;
    padding: 10px;
    height: 95vh;
}
/* SetUp Grid */

/* Search Header */
.search-header {
    display: grid;
    grid-template-areas: 'header2 header3';
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.search-header-section1,
.search-header-section2,
.search-header-section3 {
    background-color: var(--quaternary);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: 2px 0 5px var(--shadow);
    width: 100%;
    height: 100%;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-header-section1 input[type="text"] {
    max-width: 400px;
    padding: var(--spacing);
    border-radius: var(--radius);
    border: 1px solid var(--secondary);
    box-shadow: inset 0 2px 4px var(--shadow);
    font-size: 1rem;
}

.search-header-section1 button {
    background-color: var(--secondary);
    color: var(--text);
    padding: var(--spacing);
    border-radius: var(--radius);
    border: none;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.search-header-section1 button:hover {
    background-color: var(--primary);
}

.search-header-article1 {
    background-color: var(--secondary);
    border-radius: var(--radius);
    padding: 2px;
    margin: 10px;
}

.search-header-section2 label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    background-color: var(--secondary);
    color: var(--text);
    padding: 6px 10px;
    border-radius: var(--radius);
    box-shadow: 2px 2px 5px var(--shadow);
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.search-header-section2 label:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
}

.search-header-section2 input[type="checkbox"] {
    margin-right: 6px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    accent-color: var(--primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-header-section2 input[type="checkbox"]:checked {
    border-color: var(--secondary);
    box-shadow: 0 0 5px var(--primary);
}

.search-header-article2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin: 10px;
}

.search-header-article2 input[type="radio"] {
    appearance: none;
    position: absolute;
    width: 0;
    height: 0;
}

.search-header-article2 label:has(input[type="radio"]:checked) {
    background-color: var(--primary);
    color: var(--text);
    border-color: var(--primary);
}

.search-dropdown1,
.search-dropdown2 {
    position: relative;
    display: inline-block;
    width: 100%;
    z-index: 3;
}

.search-dropdown-button {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    background-color: var(--secondary);
    color: var(--text);
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-dropdown-button:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.search-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: var(--background);
    border: 1px solid var(--primary);
    border-radius: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 4;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.search-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown-menu li {
    color: var(--text);
    padding: 10px 15px;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.search-dropdown-menu li:hover,li.active {
    background-color: var(--accent);
    color: var(--background);
}

.search-header-article3 {
    width: 160px;
    padding: 2px;
    margin: 10px;
}
/* Search Header */

/* Search Main */
.search-main {
    background-color: var(--tertiary);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: 2px 0 5px var(--shadow);
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-table {
    width: calc(100% - 32px);
    max-width: 100%;
    margin: var(--spacing);
    border-collapse: separate;
    border-radius: var(--radius);
    overflow: hidden;
}

.search-table thead {
    background-color: var(--secondary);
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 2;
}

.search-table tbody {
    display: block;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
}

.search-table thead tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.search-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.search-table th, .search-table td {
    padding: 10px;
    text-align: left;
}

.search-table tbody tr:nth-child(odd) {
    background-color: var(--quaternary);
}

.search-table tbody tr:nth-child(even) {
    background-color: var(--tertiary);
}

.search-table::-webkit-scrollbar {
    width: 8px;
}

.search-table::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

.search-table::-webkit-scrollbar-track {
    background-color: var(--secondary);
}

.search-main-pagination {
    margin-top: auto;
    padding: 10px;
    display: flex;
    justify-content: start;
}

.search-main-pagination button {
    margin: 0 2px;
    padding: 5px 10px;
    width: 50px;
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    background-color: var(--secondary);
    color: var(--text);
}

.search-main-pagination button:hover {
    border: 1px solid var(--primary);
    background-color: var(--primary);
    color: var(--text);
}
/* Search Main */

/* Skeleton Table */
.skeleton-table {
    margin: 1rem;
    display: grid;
}

.skeleton-header {
    width: 100%;
    height: 2.8rem;
    background-color: var(--secondary);
    border-radius: 4px;
}

.skeleton-content {
    width: 100%;
    height: 2.2rem;
    border-radius: 4px;
    animation: shimmer 1.2s infinite linear;
}

.odd-row {
    background-color: var(--quaternary);
}

.even-row {
    background-color: var(--tertiary);
}

@keyframes shimmer {
    0% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.2;
    }
}
/* Skeleton Table */

/* Media Queries */
@media screen and (max-width: 1360px) {
    .search-body {
        grid-template-areas:
            'nav header'
            'nav main'
            'footer footer';
        grid-template-columns: 0.5fr 3fr;
        grid-template-rows: 2fr 9fr 0.5fr;
    }

    .search-header {
        grid-template-areas:
            'header2'
            'header3';
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
}

@media screen and (max-width: 1045px) {
    .search-header {
        grid-template-areas:
            'header2'
            'header3';
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
}

@media screen and (max-width: 610px) {
    .search-body {
        grid-template-areas:
            'nav'
            'main'
            'footer';
        grid-template-columns: 1fr;
        grid-template-rows: 2fr 9fr 0.5fr;
    }

    .search-header {
        display: none;
    }

    .search-table thead {
        display: none;
    }
}
/* Media Queries */