/* Загальні стилі */
.statistics-page
{
    background-color: #fff;
    padding: 20px;
}
.statistics-container {
    margin: 20px auto;
    max-width: 1200px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.statistics-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.statistics-header .filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.statistics-header .filter select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
}

/* Таблиця статистики */
.statistics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.statistics-table th,
.statistics-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.statistics-table th {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.statistics-table td {
    font-size: 14px;
    color: #555;
}

.statistics-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Стільки для логотипів */
.statistics-table .team-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.statistics-table .team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Сортування за колонками */
.statistics-table th.sortable {
    cursor: pointer;
    position: relative;
}

.statistics-table th.sortable:hover {
    background-color: #0056b3;
}

.statistics-table th.sortable::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.statistics-table th.sortable.sorted-asc::after {
    border-top-color: transparent;
    border-bottom-color: #fff;
}

.statistics-table th.sortable.sorted-desc::after {
    border-top-color: #fff;
}


.team-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.team-logo {
    flex: 0 0 64px;
    height: 64px;
    width: 64px;
    margin-right: 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #007bff;
    background-color: #f9f9f9;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-details {
    flex: 1;
    width: 100%;
}

.team-name {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
    text-transform: capitalize;
}

.team-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.team-name a:hover {
    color: #0056b3;
}

.team-statistics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row .stat-label {
    font-weight: bold;
    color: #333;
}

.stat-row .stat-value {
    font-size: 14px;
    font-weight: normal;
    color: #007bff;
    text-align: right;
}

/* Адаптивність */
@media (max-width: 768px) {
    .statistics-filter
    {
        text-align: right;
    }
    .team-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .team-logo {
        margin-bottom: 10px;
    }

    .team-statistics {
        grid-template-columns: 1fr;
    }
}

.statistics-toolbar-section {
    background: transparent;
    padding: 40px 0 0;
}

.statistics-toolbar-section .statistics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin: 0;
    padding: 22px 24px;
    border: 1px solid rgba(152, 65, 255, 0.28);
    border-radius: 8px;
    background: rgba(12, 12, 53, 0.62);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
}

.statistics-header-title {
    min-width: 0;
}

.statistics-header-title span,
.statistics-filter label {
    display: block;
    margin-bottom: 5px;
    font-family: "Oxanium", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #9841ff;
}

.statistics-toolbar-section .statistics-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
}

.statistics-filter {
    position: relative;
    flex: 0 1 420px;
    max-width: 100%;
    text-align: left;
}

.statistics-filter select {
    width: 100%;
    min-height: 54px;
    padding: 0 46px 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background-color: rgba(9, 9, 32, 0.72);
    background-image: linear-gradient(45deg, transparent 50%, #9841ff 50%), linear-gradient(135deg, #9841ff 50%, transparent 50%);
    background-position: calc(100% - 23px) 24px, calc(100% - 16px) 24px;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.statistics-filter select:focus {
    border-color: #9841ff;
    box-shadow: 0 0 0 3px rgba(152, 65, 255, 0.18);
}

.statistics-filter select option {
    color: #111;
    background: #fff;
}

.statistics-cart-section {
    padding-top: 30px;
}

@media (max-width: 991px) {
    .statistics-toolbar-section {
        padding-top: 30px;
    }

    .statistics-toolbar-section .statistics-header {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 20px;
    }

    .statistics-filter {
        flex-basis: auto;
    }
}

@media (max-width: 575px) {
    .statistics-toolbar-section {
        padding-top: 24px;
    }

    .statistics-toolbar-section .statistics-header {
        padding: 18px 15px;
    }

    .statistics-toolbar-section .statistics-header h1 {
        font-size: 23px;
    }

    .statistics-filter select {
        min-height: 50px;
        font-size: 14px;
    }
}
