/**
 * HDSV-Sportabzeichen CSS - Version 2.0 - Mit HDSV-Farben
 */

/* HDSV Farbvariablen */
:root {
    --hdsv-primary-color: #F21300; /* Rot für Hauptelemente */
    --hdsv-secondary-color: #0066B3; /* Blau für Akzente */
    --hdsv-header-color: #2ea3f2; /* Hellblau für Tabellen-Header */
    --hdsv-light-color: #ffffff; /* Weiß für Hintergründe */
    --hdsv-light-blue: #f1f5fb; /* Sehr helles Blau */
    --hdsv-text-color: #333333; /* Dunkelgrau für Text */
    --hdsv-border-color: #e3e8ed;
}

/* Container */
#hdsv-sportabzeichen-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: var(--hdsv-light-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Titel */
#hdsv-sportabzeichen-container h2 {
    text-align: center;
    color: var(--hdsv-primary-color);
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 300;
    border-bottom: 3px solid var(--hdsv-secondary-color);
    padding-bottom: 15px;
}

/* Filter */
.hdsv-filter {
    margin-bottom: 25px;
    text-align: center;
}

.hdsv-filter label {
    font-weight: 600;
    margin-right: 10px;
    color: var(--hdsv-text-color);
}

#hdsv-filter-select {
    padding: 10px 15px;
    border: 2px solid var(--hdsv-border-color);
    border-radius: 8px;
    background: var(--hdsv-light-color);
    font-size: 16px;
    color: var(--hdsv-text-color);
    min-width: 200px;
    transition: all 0.3s ease;
}

#hdsv-filter-select:focus {
    border-color: var(--hdsv-secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.1);
}

/* Tabellen-Container */
.hdsv-table-container {
    overflow-x: auto;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

/* Tabelle */
.hdsv-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--hdsv-light-color);
    border-radius: 8px;
    overflow: hidden;
}

.hdsv-table th {
    background: linear-gradient(135deg, var(--hdsv-header-color) 0%, #2090d9 100%);
    color: var(--hdsv-light-color);
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.hdsv-table th:hover {
    background: linear-gradient(135deg, #2090d9 0%, #1a7bc0 100%);
}

.hdsv-table th:after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.hdsv-table th.sort-asc:after {
    border-bottom: 4px solid var(--hdsv-light-color);
    transform: translateY(-50%) rotate(180deg);
}

.hdsv-table th.sort-desc:after {
    border-bottom: 4px solid var(--hdsv-light-color);
}

.hdsv-table td {
    padding: 15px;
    border-bottom: 1px solid var(--hdsv-border-color);
    color: var(--hdsv-text-color);
    transition: all 0.3s ease;
}

.hdsv-table tbody tr:hover {
    background: var(--hdsv-light-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 179, 0.1);
}

.hdsv-table tbody tr:nth-child(even) {
    background: rgba(241, 245, 251, 0.5);
}

.hdsv-table tbody tr:nth-child(even):hover {
    background: var(--hdsv-light-blue);
}

.hdsv-table tbody tr:last-child td {
    border-bottom: none;
}

/* Abzeichen-Spalte spezial */
.hdsv-table td:nth-child(2) {
    font-weight: 600;
    cursor: help;
}

.hdsv-table td:nth-child(2):hover {
    color: var(--hdsv-secondary-color);
}

/* Abzeichen-spezifische Farben */
.hdsv-table td:nth-child(2) {
    position: relative;
}

.hdsv-table tr:has(td:nth-child(2):contains("Gold")) td:nth-child(2),
.hdsv-table td:nth-child(2):contains("Gold") {
    color: #D4AF37;
    font-weight: 700;
}

.hdsv-table tr:has(td:nth-child(2):contains("Silber")) td:nth-child(2),
.hdsv-table td:nth-child(2):contains("Silber") {
    color: #A9A9A9;
    font-weight: 700;
}

.hdsv-table tr:has(td:nth-child(2):contains("Bronze")) td:nth-child(2),
.hdsv-table td:nth-child(2):contains("Bronze") {
    color: #CD7F32;
    font-weight: 700;
}

/* Pagination */
.hdsv-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.hdsv-pagination-links {
    display: flex;
    gap: 8px;
    align-items: center;
    background: linear-gradient(145deg, var(--hdsv-light-color) 0%, var(--hdsv-light-blue) 100%);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 
        0 8px 25px rgba(0, 102, 179, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 102, 179, 0.1);
}

.hdsv-page-link,
.hdsv-page-current {
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
    border: 2px solid transparent;
}

.hdsv-page-link {
    background: var(--hdsv-light-color);
    color: var(--hdsv-secondary-color);
    border-color: var(--hdsv-border-color);
}

.hdsv-page-link:hover {
    background: var(--hdsv-secondary-color);
    color: var(--hdsv-light-color);
    border-color: var(--hdsv-secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 179, 0.3);
    text-decoration: none;
}

.hdsv-page-current {
    background: linear-gradient(145deg, var(--hdsv-primary-color) 0%, #d01200 100%);
    color: var(--hdsv-light-color);
    border-color: var(--hdsv-primary-color);
    box-shadow: 0 4px 12px rgba(242, 19, 0, 0.4);
}

.hdsv-prev,
.hdsv-next {
    font-weight: 600;
    padding: 12px 20px;
    background: linear-gradient(145deg, var(--hdsv-light-blue) 0%, #e1ecf7 100%);
    border-color: rgba(0, 102, 179, 0.2);
}

.hdsv-prev:hover,
.hdsv-next:hover {
    background: var(--hdsv-secondary-color);
    border-color: var(--hdsv-secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 179, 0.4);
}

/* Tooltip */
.hdsv-tooltip {
    font-size: 12px;
    max-width: 250px;
    line-height: 1.4;
    pointer-events: none;
    animation: fadeInTooltip 0.2s ease;
    background: var(--hdsv-text-color) !important;
    color: var(--hdsv-light-color) !important;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #hdsv-sportabzeichen-container {
        margin: 10px;
        padding: 15px;
    }
    
    #hdsv-sportabzeichen-container h2 {
        font-size: 1.8em;
    }
    
    .hdsv-filter {
        text-align: left;
    }
    
    #hdsv-filter-select {
        width: 100%;
        max-width: none;
    }
    
    .hdsv-table th,
    .hdsv-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .hdsv-pagination-links {
        flex-wrap: wrap;
        gap: 5px;
        padding: 12px 15px;
    }
    
    .hdsv-page-link,
    .hdsv-page-current {
        padding: 8px 12px;
        min-width: 36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hdsv-table th:nth-child(3),
    .hdsv-table td:nth-child(3) {
        display: none;
    }
    
    .hdsv-table th:nth-child(1):after {
        content: ' & Datum';
        font-size: 10px;
        opacity: 0.7;
    }
    
    .hdsv-pagination-links {
        gap: 4px;
        padding: 10px 12px;
    }
}

/* Loading State */
.hdsv-loading {
    text-align: center;
    padding: 40px;
    color: var(--hdsv-text-color);
}

/* Empty State */
.hdsv-empty {
    text-align: center;
    padding: 40px;
    color: var(--hdsv-text-color);
    font-style: italic;
}