/* Навигация */
.sp-calendar-navigation {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #001e4b;
    border-radius: 10px;
}

.sp-calendar-navigation h3 {
    margin: 0 0 20px 0;
    color: #fcfcfc;
    font-size: 24px;
    font-weight: 400;
}

.month-links-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.month-link {
    text-decoration: none;
    color: #fcfcfc;
    padding: 12px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: #00335b;
    border: 1px solid #00a0d1;
    font-size: 14px;
    font-weight: 500;
}

.month-link:hover {
    background: #00a0d1;
    color: #001e4b;
}

.month-link.current-month {
    background: #00a0d1;
    color: #001e4b;
    font-weight: 600;
}

/* Календарь */
.calendar-container {
    width: 100%;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 40px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.weekday-header {
    text-align: center;
    padding: 15px;
    background: #00335b;
    color: #fcfcfc;
    font-weight: 600;
    border-radius: 5px;
    text-transform: uppercase;
}

/* Ячейки */
.calendar-day-cell {
    background: #00335b;
    border-radius: 8px;
    padding: 0;
    height: 180px;
    min-height: 180px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-day-cell.empty {
    background: #002c4f;
}

.calendar-day-cell.empty::after {
    content: '';
    flex: 1;
    margin-top: 35px;
}

/* Число дня */
.day-number {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 13px;
    font-weight: 600;
    z-index: 3;
    padding: 5px;
    border-radius: 5px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.calendar-day-cell .day-number {
    color: #8fa3b8;
}

.calendar-day-cell.has-match .day-number {
    color: #fcfcfc;
    background: #00a0d1;
}

/* Блок матча */
.match-card {
    background: #fcfcfc;
    border-radius: 6px;
    padding: 8px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.home-match .match-card {
    background: #009ee1;
}

.match-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Время матча - ДЕСКТОПНАЯ ВЕРСИЯ */
.match-time {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
    color: #00a0d1;
    line-height: 1.2;
    flex-shrink: 0;
    padding-top: 0;
}

.home-match .match-time {
    color: #fcfcfc;
}

/* Команды */
.teams-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 0;
    flex-shrink: 1;
}

/* Базовые стили логотипа */
.team-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Стиль для логотипа гостевой команды */
.away-match .team-logo {
    border: 1px solid #009ee1;
    border-radius: 50%;
    padding: 2px;
}

/* Для домашних матчей убираем обводку */
.home-match .team-logo {
    border: none;
    padding: 0;
    border-radius: 4px;
}

.team-name {
    font-size: 11px;
    font-weight: 500;
    color: #001e4b;
    flex: 1;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-match .team-name {
    color: #fcfcfc;
}

/* Счет */
.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.team-score {
    font-size: 14px;
    font-weight: 700;
    color: #001e4b;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

.home-match .team-score {
    color: #fcfcfc;
}

.winner {
    color: #00a0d1;
}

.home-match .winner {
    color: #fcfcfc;
}

/* Дополнительная информация */
.match-info-line {
    text-align: center;
    font-size: 10px;
    color: #666;
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: 2px;
}

.home-match .match-info-line {
    color: #fcfcfc;
}

.match-league {
    margin-bottom: 5px;
}

.match-venue {
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px solid #eee;
    font-size: 9px;
}

.home-match .match-venue {
    border-top-color: rgba(252, 252, 252, 0.3);
}

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    .calendar-grid,
    .calendar-weekdays {
        gap: 4px;
    }
    
    .calendar-day-cell {
        height: 100px;
        min-height: 100px;
    }
    
    .weekday-header {
        padding: 8px 2px;
        font-size: 10px;
    }
    
    .day-number {
        top: 4px;
        left: 2px;
        font-size: 10px;
        width: 18px;
        height: 18px;
        padding: 2px;
    }
    
    .match-card {
        margin-top: 8px;
        padding: 3px 2px 3px 2px;
        height: calc(100% - 25px);
    }
    
    .match-time {
        font-size: 8px;
        margin: 1px 0 10px 0;
        line-height: 1;
        text-align: right;
        color: #00a0d1;
        position: static;
        background: none;
        padding: 0;
    }
    
    .home-match .match-time {
        color: #fcfcfc;
        background: none;
    }
    
    .team-logo {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }
    
    /* Для мобильной версии тоже применяем обводку для гостевых матчей */
    .away-match .team-logo {
        border: 1px solid #009ee1;
        border-radius: 50%;
        padding: 1px; /* Меньший отступ для мобильных */
    }
    
    .home-match .team-logo {
        border: none;
        padding: 0;
        border-radius: 4px;
    }
    
    .team-row {
        justify-content: center;
        gap: 2px;
        margin-bottom: 2px;
    }
    
    .teams-container {
        gap: 2px;
        margin-bottom: 2px;
        margin-top: 0;
    }
    
    .match-score {
        gap: 0;
        margin-left: 1px;
    }
    
    .team-score {
        font-size: 11px;
        min-width: 14px;
    }
    
    .team-name,
    .match-venue,
    .match-league {
        display: none;
    }
}

/* ПЛАНШЕТНАЯ ВЕРСИЯ (вертикальная ориентация) */
@media (max-width: 1024px) and (min-width: 769px) {
    .calendar-grid,
    .calendar-weekdays {
        gap: 6px;
    }
    
    .calendar-day-cell {
        height: 130px;
        min-height: 130px;
    }
    
    .weekday-header {
        padding: 10px 4px;
        font-size: 11px;
    }
    
    .day-number {
        top: 4px;
        left: 4px;
        font-size: 11px;
        width: 20px;
        height: 20px;
        padding: 3px;
    }
    
    .match-card {
        margin-top: 8px;
        padding: 4px 3px;
        height: calc(100% - 25px);
        position: relative;
    }
    
    .match-time {
        position: absolute;
        top: 3px;
        right: 3px;
        margin: 0;
        font-size: 9px;
        font-weight: 600;
        color: #00a0d1;
        background: none;
        padding: 0;
        z-index: 2;
        text-align: right;
    }
    
    .home-match .match-time {
        color: #fcfcfc;
        background: none;
    }
    
    .team-name,
    .match-venue {
        display: none;
    }
    
    .match-league {
        display: block;
        font-size: 9px;
        text-align: center;
        margin-top: 2px;
        margin-bottom: 0;
    }
    
    .team-logo {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
    
    /* Для планшетной версии тоже применяем обводку для гостевых матчей */
    .away-match .team-logo {
        border: 1px solid #009ee1;
        border-radius: 50%;
        padding: 2px;
    }
    
    .home-match .team-logo {
        border: none;
        padding: 0;
        border-radius: 4px;
    }
    
    .team-row {
        justify-content: flex-start;
        gap: 4px;
        margin-bottom: 3px;
    }
    
    .teams-container {
        gap: 3px;
        margin-bottom: 3px;
        margin-top: 23px;
    }
    
    .match-score {
        gap: 0;
        margin-left: auto;
    }
    
    .team-score {
        font-size: 13px;
        min-width: 18px;
    }
}

@media (max-width: 480px) {
    .calendar-day-cell {
        height: 90px;
        min-height: 90px;
    }
    
    .team-logo {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
    
    .away-match .team-logo {
        padding: 1px;
    }
    
    .match-time {
        font-size: 7px;
        margin: 1px 0 10px 0;
    }
}

@media (max-width: 360px) {
    .calendar-day-cell {
        height: 85px;
        min-height: 85px;
    }
    
    .team-logo {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }
    
    .away-match .team-logo {
        padding: 1px;
    }
    
    .match-time {
        font-size: 6px;
        margin: 1px 0 10px 0;
    }
    
    .team-score {
        font-size: 10px;
    }
}



/* Обновляем стили навигации */
.sp-calendar-navigation {
    margin-bottom: 15px;
    padding: 12px;
    background: #001e4b;
    border-radius: 10px;
}

/* Контейнер для верхней строки (фильтры + выбор сезона) */
.navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

/* Фильтры матчей */
.match-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

/* Стили для кнопок с классами Visual Composer */
.filter-btn,
.month-link {
    text-decoration: none;
    border-radius: 28px !important;
    padding: 10px 17px !important; /* Исправленный padding */
    font-size: 14px;
    font-weight: 500;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Стили по умолчанию (flat default) */
.filter-btn,
.month-link {
    background: #f7f7f7 !important;
    color: #666 !important;
}

.filter-btn:hover,
.month-link:hover {
    background: #eeeeee !important;
    color: #333 !important;
}

.filter-btn.active,
.month-link.current-month {
    background: #00a0d1 !important;
    color: #ffffff !important;
}

/* Стилизация выпадающего списка сезона */
.season-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.season-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 28px !important;
    padding: 10px 40px 10px 17px !important; /* padding с учетом стрелки */
    font-size: 14px;
    font-weight: 500;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f7f7f7 !important;
    color: #666 !important;
    min-width: 140px;
    text-align: center;
}

/* Стрелка для выпадающего списка */
.season-dropdown {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 17px center;
    background-size: 16px;
}

.season-dropdown:hover {
    background: #eeeeee !important;
    color: #333 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Стилизация options в выпадающем списке */
.season-dropdown option {
    background: #ffffff;
    color: #333;
    padding: 10px;
    border-radius: 0;
    font-size: 14px;
}

.season-dropdown option:hover {
    background: #00a0d1 !important;
    color: #ffffff !important;
}

.season-dropdown option:checked {
    background: #00a0d1 !important;
    color: #ffffff !important;
}

/* Контейнер для месяцев */
.month-links-wrapper {
    width: 100%;
    overflow: hidden;
}

.month-links-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: #00a0d1 #00335b;
    width: 100%;
    min-width: 100%;
}

/* Стили для скроллбара */
.month-links-container::-webkit-scrollbar {
    height: 6px;
}

.month-links-container::-webkit-scrollbar-track {
    background: #00335b;
    border-radius: 3px;
}

.month-links-container::-webkit-scrollbar-thumb {
    background: #00a0d1;
    border-radius: 3px;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .sp-calendar-navigation {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .navigation-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .match-filters {
        justify-content: center;
        flex-wrap: wrap;
        order: 2;
    }
    
    .season-selector {
        justify-content: center;
        order: 1;
    }
    
    .filter-btn,
    .month-link,
    .season-dropdown {
        padding: 10px 15px !important;
        font-size: 13px;
    }
    
    .season-dropdown {
        min-width: 120px;
        padding-right: 35px !important;
        background-position: right 15px center;
    }
}

/* Улучшенная стилизация для Firefox */
@-moz-document url-prefix() {
    .season-dropdown {
        padding-right: 17px !important;
        text-indent: 0.01px;
        text-overflow: '';
    }
    .season-dropdown option {
        background: white;
        color: black;
    }
}

/* Улучшенная стилизация для Internet Explorer */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .season-dropdown {
        padding-right: 17px !important;
    }
    .season-dropdown::-ms-expand {
        display: none;
    }
}

.select_container select:not(.esg-sorting-select):not([class*="trx_addons_attrib_"]) {
    border: 3px solid #fff !important;
  padding: 3px !important;
  margin-left: 0px !important;
  color: #fff !important;
    
}

.select_container::after

{
    right: 9px;
    
}
.select_container select:not(.esg-sorting-select):not([class*="trx_addons_attrib_"]):hover

{
    background-color: transparent !important;
    
}