/* TKD Ranking Frontend Styles */

.tkd-ranking-wrapper {
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

/* Filteri */
.tkd-filters {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.tkd-filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.tkd-filter-item {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.tkd-filter-item label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.tkd-filter-item select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
}

/* Gumbi */
.tkd-btn-show,
.tkd-btn-reset {
    padding: 8px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.3s;
    border: none;
    height: 38px;
    line-height: 38px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    vertical-align: bottom;
}

.tkd-btn-show {
    background: #2271b1;
    color: #fff;
}

.tkd-btn-show:hover {
    background: #135e96;
}

.tkd-btn-reset {
    background: #666;
    color: #fff !important;
}

.tkd-btn-reset:hover {
    background: #444;
    color: #fff !important;
}

.tkd-filter-item.tkd-buttons-group {
    display: flex;
    flex-direction: row;
    align-items: flex-end !important;
    gap: 10px;
    min-width: auto;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.tkd-filter-item.tkd-buttons-group button,
.tkd-filter-item.tkd-buttons-group a {
    margin: 0 !important;
    vertical-align: bottom;
}

/* Tablica container */
.tkd-table-container {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Tablica */
.tkd-ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tkd-ranking-table th,
.tkd-ranking-table td {
    padding: 5px 5px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.tkd-ranking-table th {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.tkd-ranking-table td {
    font-size: 14px;
}

/* Sticky prva 4 stupca */
.tkd-sticky-col {
    position: sticky;
    background: #fff;
    z-index: 10;
}

.tkd-sticky-col:nth-child(1) {
    left: 0;
    min-width: 50px;
    text-align: center;
}

.tkd-sticky-col:nth-child(2) {
    left: 50px;
    min-width: 180px;
}

.tkd-sticky-col:nth-child(3) {
    left: 230px;
    min-width: 150px;
}

.tkd-sticky-col:nth-child(4) {
    left: 380px;
    min-width: 100px;
    text-align: center;
    font-weight: bold;
}

.tkd-sticky-col:nth-child(5) {
    left: 480px;
    min-width: 100px;
    text-align: center;
    font-weight: bold;
}

/* Header - Muški (plavi) */
.tkd-header-m,
.tkd-header-male,
.tkd-ranking-table thead tr.tkd-header-m th,
.tkd-ranking-table thead tr.tkd-header-male th {
    background: #4a90e2;
    color: #fff;
}

.tkd-header-m .tkd-sticky-col,
.tkd-header-male .tkd-sticky-col {
    background: #4a90e2 !important;
}

/* Header - Ženski (narančasti) */
.tkd-header-f,
.tkd-header-female,
.tkd-ranking-table thead tr.tkd-header-f th,
.tkd-ranking-table thead tr.tkd-header-female th {
    background: #e67e22;
    color: #fff;
}

.tkd-header-f .tkd-sticky-col,
.tkd-header-female .tkd-sticky-col {
    background: #e67e22 !important;
}

/* Header - Klubovi (zeleni) */
.tkd-header-clubs,
.tkd-ranking-table thead tr.tkd-header-clubs th {
    background: #27ae60;
    color: #fff;
}

.tkd-header-clubs .tkd-sticky-col {
    background: #27ae60 !important;
}

/* Header - All/Mixed */
.tkd-header-all,
.tkd-ranking-table thead tr.tkd-header-all th {
    background: #34495e;
    color: #fff;
}

.tkd-header-all .tkd-sticky-col {
    background: #34495e !important;
}

/* Rows - Muški */
.tkd-row-male {
    background: #e8f4fd;
}

.tkd-row-male:hover {
    background: #d1e7f7;
}

.tkd-row-male .tkd-sticky-col {
    background: #e8f4fd;
}

.tkd-row-male:hover .tkd-sticky-col {
    background: #d1e7f7;
}

/* Rows - Ženski */
.tkd-row-female {
    background: #fdeee8;
}

.tkd-row-female:hover {
    background: #fcddc8;
}

.tkd-row-female .tkd-sticky-col {
    background: #fdeee8;
}

.tkd-row-female:hover .tkd-sticky-col {
    background: #fcddc8;
}

/* Rows - Klubovi */
.tkd-row-club {
    background: #e8f8f0;
}

.tkd-row-club:hover {
    background: #d1f2e1;
}

.tkd-row-club .tkd-sticky-col {
    background: #e8f8f0;
}

.tkd-row-club:hover .tkd-sticky-col {
    background: #d1f2e1;
}

/* Brojevi stupci */
.tkd-ranking-table td:not(.tkd-sticky-col) {
    text-align: center;
}

/* Nema rezultata */
.tkd-no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .tkd-filter-row {
        flex-direction: column;
    }
    
    .tkd-filter-item {
        width: 100%;
    }
    
    .tkd-ranking-table {
        font-size: 12px;
    }
    
    .tkd-ranking-table th,
    .tkd-ranking-table td {
        padding: 8px 10px;
    }
}
