/**
 * Стили для модального окна полного календаря матчей
 * Адаптировано под мобильные устройства
 */

.month-calendar-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    padding: 1rem;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.month-calendar-modal.active {
    display: flex;
}

.month-calendar-content {
    width: 100%;
    max-width: 80rem;
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f3f4f6;
    padding: 2rem 2.5rem;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
}

.dark .month-calendar-content {
    background: #18181b;
    border-color: #3f3f46;
}

.month-calendar-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem;
    border-radius: 9999px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s;
}

.month-calendar-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.dark .month-calendar-close:hover {
    background: #27272a;
    color: #f3f4f6;
}

.month-calendar-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-right: 4rem;
}

.month-calendar-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-calendar-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.dark .month-calendar-icon {
    background: rgba(59, 130, 246, 0.2);
}

.month-calendar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.025em;
    font-family: 'Inter', sans-serif;
}

.dark .month-calendar-title {
    color: #f3f4f6;
}

.month-calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-calendar-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 0.25rem;
    border: 1px solid #f3f4f6;
}

.dark .month-calendar-nav-wrapper {
    background: #27272a;
    border-color: #3f3f46;
}

.month-calendar-nav-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.month-calendar-nav-btn:hover {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #3b82f6;
}

.dark .month-calendar-nav-btn:hover {
    background: #3f3f46;
}

.month-calendar-current-month {
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-width: 120px;
    text-align: center;
}

.dark .month-calendar-current-month {
    color: #f3f4f6;
}

.month-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
}

.month-calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    padding: 0.5rem 0;
}

.dark .month-calendar-weekday {
    color: #9ca3af;
}

.month-calendar-day {
    height: 6.5rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.month-calendar-day.empty {
    opacity: 0.3;
}

.month-calendar-day.normal {
    background: #ffffff;
    border-color: #f3f4f6;
}

.dark .month-calendar-day.normal {
    background: #27272a;
    border-color: #3f3f46;
}

.month-calendar-day.normal:hover {
    border-color: #e5e7eb;
}

.dark .month-calendar-day.normal:hover {
    border-color: #52525b;
}

.month-calendar-day.today {
    background: #ffffff;
    border-top: 4px solid #3b82f6;
    border-left: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1), 0 4px 25px -5px rgba(59, 130, 246, 0.15);
}

.dark .month-calendar-day.today {
    background: #27272a;
    border-left-color: #3f3f46;
    border-right-color: #3f3f46;
    border-bottom-color: #3f3f46;
}

.month-calendar-day.match {
    background: #ffffff;
    border: 1px solid #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.dark .month-calendar-day.match {
    background: #27272a;
}

.month-calendar-day.match:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.month-calendar-day.match-win {
    background: rgba(34, 197, 94, 0.15);
}

.dark .month-calendar-day.match-win {
    background: rgba(34, 197, 94, 0.18);
}

.month-calendar-day.match-loss {
    background: rgba(239, 68, 68, 0.15);
}

.dark .month-calendar-day.match-loss {
    background: rgba(239, 68, 68, 0.18);
}

.month-calendar-day-number {
    font-size: 1.25rem;
    font-weight: 500;
    color: #111827;
}

.dark .month-calendar-day-number {
    color: #f3f4f6;
}

.month-calendar-day.match .month-calendar-day-number {
    display: none;
}

.dark .month-calendar-day.match .month-calendar-day-number {
    color: #9ca3af;
}

.month-calendar-day.today .month-calendar-day-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.month-calendar-day-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.month-calendar-match-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-top: 0.5rem;
}

.month-calendar-match-score,
.month-calendar-match-time {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.dark .month-calendar-match-score,
.dark .month-calendar-match-time {
    color: #f3f4f6;
}

.month-calendar-match-team {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.month-calendar-match-team-logo {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.month-calendar-match-team-name {
    font-size: 0.625rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dark .month-calendar-match-team-name {
    color: #9ca3af;
}

.month-calendar-match-indicator {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: #3b82f6;
    margin-top: 0.25rem;
}

/* Адаптация для планшетов */
@media (max-width: 1024px) {
    .month-calendar-content {
        padding: 1.5rem 1.5rem;
    }
    
    .month-calendar-grid {
        gap: 0.625rem;
    }
    
    .month-calendar-day {
        height: 6rem;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .month-calendar-modal {
        padding: 0.5rem;
    }
    
    .month-calendar-content {
        padding: 1.25rem 1rem;
        border-radius: 1rem;
        max-height: 98vh;
    }
    
    .month-calendar-close {
        top: 1rem;
        right: 1rem;
        padding: 0.375rem;
    }
    
    .month-calendar-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
        align-items: flex-start;
    }
    
    .month-calendar-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .month-calendar-title {
        font-size: 1.125rem;
    }
    
    .month-calendar-nav {
        width: 100%;
        justify-content: center;
    }
    
    .month-calendar-grid {
        gap: 0.5rem;
    }
    
    .month-calendar-day {
        height: 5.5rem;
        padding: 0.375rem;
    }
    
    .month-calendar-weekday {
        font-size: 0.625rem;
        padding: 0.375rem 0;
    }
    
    .month-calendar-day-number {
        font-size: 1rem;
    }
    
    .month-calendar-day.today .month-calendar-day-number {
        font-size: 1.25rem;
    }
    
    .month-calendar-day.match .month-calendar-day-number {
        display: none;
    }
    
    .month-calendar-match-score,
    .month-calendar-match-time {
        font-size: 1rem;
    }
    
    .month-calendar-match-team-logo {
        width: 0.625rem;
        height: 0.625rem;
    }
    
    .month-calendar-match-team-name {
        font-size: 0.5rem;
    }
    
    .month-calendar-day-label {
        font-size: 0.5rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .month-calendar-content {
        padding: 1rem 0.75rem;
    }
    
    .month-calendar-header {
        padding-right: 2rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .month-calendar-title {
        font-size: 1rem;
    }
    
    .month-calendar-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .month-calendar-grid {
        gap: 0.375rem;
    }
    
    .month-calendar-day {
        height: 4.5rem;
        padding: 0.25rem;
        border-radius: 0.5rem;
    }
    
    .month-calendar-day-number {
        font-size: 0.875rem;
    }
    
    .month-calendar-day.today .month-calendar-day-number {
        font-size: 1.125rem;
    }
    
    .month-calendar-day.match .month-calendar-day-number {
        display: none;
    }
    
    .month-calendar-match-score,
    .month-calendar-match-time {
        font-size: 0.875rem;
    }
    
    .month-calendar-match-team {
        gap: 0.25rem;
    }
    
    .month-calendar-match-team-logo {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .month-calendar-match-team-name {
        font-size: 0.45rem;
    }
    
    .month-calendar-day-label {
        font-size: 0.45rem;
    }
    
    .month-calendar-match-indicator {
        width: 0.25rem;
        height: 0.25rem;
    }
}

/* Скрытие скроллбара для модального окна */
.month-calendar-content::-webkit-scrollbar {
    width: 6px;
}

.month-calendar-content::-webkit-scrollbar-track {
    background: transparent;
}

.month-calendar-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.month-calendar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}
