/* Wrapper for overall structure */
.job-listings-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

/* Layout: Filters on the left, results on the right */
.job-listings-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Filters section */
.job-filters {
    flex: 0 0 250px;
    border-right: 1px solid #ccc;
    padding-right: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#clear-filters, #clear-filters:hover, #clear-filters:focus {
    color: rgb(64, 112, 202);
    background: none;
    border: none;
    text-transform: uppercase;
}
.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-size: 16px;
    margin: 5px 0;
    white-space: nowrap;
}
.job-filters h3, .job-filters h4 {
    font-family: "Roboto", Sans-serif;
    font-size: 16px;
    font-weight: 600;
}
/* Search Result container*/
.result-search-container {
    width: 100%;
}
/* Search and sorting controls */
.search-sort-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}
@media (max-width: 768px) {
    .search-sort-container {
        flex-direction: column;
    }
    .search-sort-container .sort-controls {
        width: 100%
    }
    .search-sort-container .search-container {
        width: 100%;
    }
    #search_btn {
        right: 100px !important;
        margin-top: -5px !important;
    }
    #clear_icon {
        right: 70px !important;
        margin-top: -10px !important;
    }
}
.search-container,
.sort-controls {
    width: 50%;
}

#sort_field,
#sort_order {
    width: 70%;
}

.search-container {
    display: flex;
    gap: 10px;
}

.search-container input {
    width: 100%;
    /*padding: 8px;*/
    border: 1px solid #ccc;
    border-radius: 20px !important;
    padding-right: 160px;
    height: 39px;
    box-sizing: border-box;
}

.search-container button {
    padding: 8px 12px;
    /*background-color: #0073aa;*/
    color: #0073aa;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.search-container button:hover {
    background: none;
    color: #0073aa;
}
.search-container button:focus {
    background: none;
    color: #0073aa;
}
/* filter toggle */
.show-filter-btn{display:none;margin-bottom:10px}
@media(max-width:768px){
    .job-filters{display:none}
    .show-filter-btn{display:inline-block}
    .job-filters.visible{
        display:block!important;
        position:absolute;top:60px;left:10px;right:10px;
        background:#fff;padding:15px;border:1px solid #ccc;
        border-radius:5px;box-shadow:0 2px 8px rgba(0,0,0,.2);
        z-index:1000
    }
}
/* Sort controls */
.sort-controls {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.sort-controls label {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

.sort-controls select {
    margin-left: 8px; /* Adds some space between the label and the select box */
    border-radius: 20px;
}

/* Job listings section */
#job-listings-container {
    flex: 1;
}

/* Table styles */
/* Table layout */
.job-listings-table {
    width: 100%;
    border-collapse: collapse;
    border-top: none !important; /* Removes the top border */
}

/* Table header and body */
.job-listings-table th,
.job-listings-table td {
    padding: 20px 10px;
    border: none !important;
    background: none !important;
    border-bottom: 1px solid #ccc !important; /* Keeps only bottom border */
    text-align: left;
    font-size: 16px;
}

@media (max-width: 768px) {
    .job-listings-table th,
    .job-listings-table td {
        padding: 10px 0px !important;
        font-family: "Roboto", Sans-serif;
        font-size: 16px;
        font-weight: 400;
    }
}
/* responsive stack */
.mobile-role-header{display:none}
@media(max-width:768px){
    .mobile-role-header{display:block;font-size:1.2em;margin-bottom:10px; font-weight: bold}
    .job-listings-table thead{display:none}
    .job-listings-table, .job-listings-table tbody,
    .job-listings-table tr, .job-listings-table td{
        display:block;width:100%
    }
    .job-listings-table tr{margin-bottom:1rem;border-bottom:none}
    .job-listings-table td{
        padding:20px 10px;
        border:none!important;
        position:relative;
    }
    .job-listings-table tr td:last-child{
        border-bottom:1px solid #ccc;
    }
}
.border-top-on-mobile {
    display: none; /* Hide by default */
}

@media (max-width: 768px) {
    .border-top-on-mobile {
        display: block; /* Show on mobile screens */
        margin-bottom: 10px !important;
    }
}
/* Pagination */
.job-listings-pagination {
    text-align: center;
    margin-top: 15px;
}

.job-listings-pagination a,
.job-listings-pagination span.current-page {
    margin: 0 6px;
    padding: 5px 10px;
    border-radius: 30px;
    text-decoration: none;
    color: inherit;
}

.job-listings-pagination a:hover {
    background: lightgray;
}

.job-listings-pagination span.current-page {
    background: black;
    color: #fff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .job-listings-layout {
        flex-direction: column;
    }

    .job-filters {
        border-right: none;
        padding-right: 0;
    }

    .search-container input {
        width: 100%;
    }
}
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px; /* half the width & height to center */
    border: 4px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

