/* Frekvencijski Popis Search - Styles */

.fps-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 20px 0;
    overflow-x: auto;
}

/* Column Filters */
.fps-column-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.fps-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fps-filter {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fps-filter:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.fps-filter::placeholder {
    color: #6c757d;
}

/* Table Styles */
.fps-wrapper table.dataTable {
    width: 100% !important;
    max-width: 100%;
    table-layout: auto;
}

#fps-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

#fps-table thead th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    white-space: normal;
    word-wrap: break-word;
}

#fps-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    word-break: break-word;
}

#fps-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

#fps-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#fps-table tbody tr:hover {
    background-color: #e8f4f8;
}

/* DataTables Overrides */
.fps-wrapper .dataTables_wrapper {
    font-size: 14px;
    overflow-x: auto;
}

.fps-wrapper .dataTables_length,
.fps-wrapper .dataTables_filter,
.fps-wrapper .dataTables_info,
.fps-wrapper .dataTables_paginate {
    margin: 10px 0;
}

.fps-wrapper .dataTables_length select,
.fps-wrapper .dataTables_filter input {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin: 0 5px;
}

.fps-wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

/* Pagination */
.fps-wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    color: #333 !important;
    cursor: pointer;
    transition: all 0.2s;
}

.fps-wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.fps-wrapper .dataTables_paginate .paginate_button.current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff !important;
}

.fps-wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Export Buttons */
.fps-wrapper .dt-buttons {
    margin-bottom: 15px;
}

.fps-wrapper .dt-buttons button {
    padding: 8px 16px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    background-color: #0073aa;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.fps-wrapper .dt-buttons button:hover {
    background-color: #005a87;
}

.fps-wrapper .dt-buttons button:active {
    transform: translateY(1px);
}

/* Info text */
.fps-wrapper .dataTables_info {
    color: #6c757d;
    font-size: 13px;
}

/* Loading state */
.fps-wrapper .dataTables_processing {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px 20px;
    font-size: 14px;
    color: #333;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .fps-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fps-filter {
        width: 100%;
        min-width: auto;
    }
    
    #fps-table thead th,
    #fps-table tbody td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .fps-wrapper .dt-buttons button {
        padding: 6px 10px;
        font-size: 12px;
        margin-bottom: 5px;
    }
}

/* Sorting icons - consistent gray triangles */
#fps-table thead th.sorting,
#fps-table thead th.sorting_asc,
#fps-table thead th.sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

#fps-table thead th.sorting::after,
#fps-table thead th.sorting_asc::after,
#fps-table thead th.sorting_desc::after {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.6;
}

#fps-table thead th.sorting::after {
    content: "▲▼";
    font-size: 8px;
    color: #999;
}

#fps-table thead th.sorting_asc::after {
    content: "▲";
    color: #666;
    opacity: 1;
}

#fps-table thead th.sorting_desc::after {
    content: "▼";
    color: #666;
    opacity: 1;
}

/* Hide default DataTables sort icons */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after {
    display: none !important;
}

/* Empty state */
#fps-table tbody .dataTables_empty {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}
