/* Screen reader only class for accessible labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.log-sources-container {
    margin: 20px 0;
}

#logSourcesTable thead th th,
#logSourcesTable tbody#logSourcesBody tr td{
    width:33.33%
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.search-box  {
    width: 60%;
}

.search-box input {
    padding: 8px 12px;
    /* width: 300px; */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 0;
}

.search-box  input[type="text"]:focus{
    border-color:var(--HOVER-COLOR);
}

.entries-control{
    width: 30%;
    justify-items: right;
}

.entries-control label{
    margin-bottom:0;
}

.entries-control select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
    font-weight:300;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.log-sources-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.log-sources-table thead {
    background-color: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color, #b21f28);
    color: rgb(0, 0, 0);
}

.log-sources-table thead th:hover {
    color: #fff;
}

.log-sources-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.log-sources-table th:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.sort-icon {
    margin-left: 5px;
    opacity: 0.5;
    font-size: 12px;
}

.log-sources-table th.sort-asc .sort-icon::before {
    content: "↑";
    opacity: 1;
}

.log-sources-table th.sort-desc .sort-icon::before {
    content: "↓";
    opacity: 1;
}

.log-sources-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.log-sources-table tbody tr:hover {
    background-color: #f5f5f5;
}

.log-sources-table td {
    padding: 12px;
}

.log-sources-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.log-sources-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.showing-info {
    color: #666;
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--MAIN-LINK-color, #b21f28);
    color: white;
    border-color: var(--MAIN-LINK-color, #b21f28);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background-color: var(--MAIN-LINK-color, #b21f28);
    color: white;
    border-color: var(--MAIN-LINK-color, #b21f28);
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
}

.log-sources-table td:last-child {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input {
        width: 100%;
    }

    .table-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination {
        justify-content: center;
    }
}
