/* --- YKSINKERTAINEN HAKUKENTÄN TYYLI --- */
.osallistujalista-wrap .osallistujalista-search-wrap {
    margin-bottom: 20px;
}

.osallistujalista-wrap .osallistujalista-search {
    width: 100%;
    /* max-width: 450px; <-- POISTETTU */
    height: 44px;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- TAULUKON TYYLIT (LOPULLINEN VERSIO) --- */

.osallistujalista-wrap .osallistujalista-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.osallistujalista-wrap .osallistujalista-table th,
.osallistujalista-wrap .osallistujalista-table td {
    padding: 12px 15px;
    text-align: left;
    border: none !important; 
    background-color: transparent !important;
}

/* Vain vaakaviivat */
.osallistujalista-wrap .osallistujalista-table thead th {
    background-color: transparent !important;
    font-weight: bold !important;
    border-bottom: 2px solid #dddddd !important; 
    color: #333; /* Oletusväri otsikoille */
}

.osallistujalista-wrap .osallistujalista-table tbody td {
    border-bottom: 1px solid #dddddd !important; 
}

/* Seepra-raidat (pariton) */
.osallistujalista-wrap .osallistujalista-table tbody tr:nth-child(odd) td {
    background-color: #f9f9f9 !important; 
}

/* Lajittelun ilmaisimet */
.osallistujalista-wrap .osallistujalista-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    transition: color 0.2s ease; /* Pehmeä värinvaihto */
}
.osallistujalista-wrap .osallistujalista-table th.sortable::after {
    content: ' ';
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -8px;
    border: 5px solid transparent;
    opacity: 0.3;
}

/* Aktiivisen sarakkeen teksti siniseksi */
.osallistujalista-wrap .osallistujalista-table th.sorted-asc,
.osallistujalista-wrap .osallistujalista-table th.sorted-desc {
    color: #0073e5 !important;
}

/* Aktiivisen sarakkeen nuoli siniseksi (nouseva) */
.osallistujalista-wrap .osallistujalista-table th.sorted-asc::after {
    border-bottom-color: #0073e5 !important;
    opacity: 1;
}

/* Aktiivisen sarakkeen nuoli siniseksi (laskeva) */
.osallistujalista-wrap .osallistujalista-table th.sorted-desc::after {
    border-top-color: #0073e5 !important;
    opacity: 1;
}

/* Harmaa nuoli ei-aktiivisille sarakkeille */
.osallistujalista-wrap .osallistujalista-table th:not(.sorted-asc):not(.sorted-desc).sortable::after {
     border-bottom-color: #333;
}


/* --- MOBIILITYYLIT --- */
@media (max-width: 767px) {
    .osallistujalista-wrap .osallistujalista-table thead {
        display: none;
    }
    .osallistujalista-wrap .osallistujalista-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dddddd !important;
        background-color: transparent !important;
    }
    .osallistujalista-wrap .osallistujalista-table td {
        display: block;
        text-align: right;
        border: none !important;
        border-bottom: 1px dotted #ccc !important;
        position: relative;
        padding-left: 50%;
    }
    .osallistujalista-wrap .osallistujalista-table td:last-child {
        border-bottom: none !important;
    }
    .osallistujalista-wrap .osallistujalista-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 600;
        text-align: left;
        width: calc(50% - 30px);
    }
    
    .osallistujalista-wrap .osallistujalista-table tbody tr:nth-child(odd) {
         background-color: transparent !important;
    }
    .osallistujalista-wrap .osallistujalista-table tbody tr:nth-child(odd) td {
        background-color: #f9f9f9 !important; 
    }
}
