/* Основные стили */
.coc-calendar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Шапка календаря */
.coc-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e4a9e;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    gap: 15px;
}

.coc-calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.coc-calendar-header .coc-calendar-title {
    color: white;
}

.coc-nav-btn {
    background: white;
    color: #1e4a9e;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.coc-nav-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* CSS Grid календарь */
.coc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* Дни недели */
.coc-weekday {
    background: #1e4a9e;
    color: white;
    padding: 15px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

/* Ячейка дня */
.coc-day-cell {
    position: relative;
    background: white;
    min-height: 120px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s;
}

.coc-day-cell:hover {
    background: #f8f9fa;
}

.coc-day-cell.coc-empty {
    background: #f5f5f5;
}

.coc-day-cell.coc-today {
    background: #e8f0fe;
}

.coc-day-cell.coc-weekend {
    background: #fafafa;
}

/* Номер дня */
.coc-day-number {
    font-weight: 600;
    color: #1e4a9e;
    font-size: 16px;
    margin-bottom: 4px;
}

.coc-day-cell.coc-today .coc-day-number {
    background: #1e4a9e;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.coc-day-cell .coc-event-overlay {
    position: absolute;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.coc-event-overlay:hover + .coc-event, 
.coc-event-overlay:hover ~ .coc-event{    
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.coc-day-cell.coc-weekend .coc-day-number {
    color: #dc3545;
}

/* Контейнер событий */
.coc-events-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

/* События */
.coc-event {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coc-event.coc-highlighted {
    background: #f4a261;
    color: #000;
    font-weight: 600;
}

.coc-event.coc-blue {
    background: #1e4a9e;
    color: white;
}

.coc-event.coc-green {
    background: #2a9d8f;
    color: white;
}

.coc-event.coc-yellow {
    background: #e9c46a;
    color: #000;
}

/* Модальное окно */
.coc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.coc-modal-content {
    background-color: #fefefe;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.coc-close-modal {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
}

.coc-close-modal:hover {
    color: #000;
}

#coc-modal-body {
    padding: 60px 30px 30px 30px;
}

#coc-modal-body .modal-header h2 {
    color: white;
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .coc-calendar-wrapper {
        padding: 10px;
    }
    
    .coc-calendar-header {
        padding: 15px 10px;
    }
    
    .coc-calendar-title {
        font-size: 18px;
    }
    
    .coc-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .coc-weekday {
        padding: 10px 4px;
        font-size: 12px;
    }
    
    .coc-day-cell {
        min-height: 80px;
        padding: 4px;
    }
    
    .coc-day-number {
        font-size: 14px;
    }
    
    .coc-event {
        font-size: 10px;
        padding: 2px 4px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .coc-calendar-grid {
        gap: 2px;
    }
    
    .coc-weekday {
        padding: 8px 2px;
        font-size: 11px;
    }
    
    .coc-day-cell {
        min-height: 68px;
        padding: 2px;
    }
    
    .coc-day-number {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .coc-event {
        font-size: 9px;
        padding: 2px;
        margin-bottom: 1px;
    }
    
    /* На мобильных скрываем текст событий, показываем точку */
    .coc-event {
        display: none;
    }
    
    .coc-day-cell.coc-has-events::after {
        content: '\1F4C5';
        filter: hue-rotate(180deg) saturate(2);
        /* color: #1e4a9e; */
        font-size: 20px;
        position: absolute;
        bottom: 2px;
        right: 4px;
    }
    
    .coc-day-cell.coc-has-events {
        position: relative;
    }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
    .coc-weekday {
        font-size: 10px;
        padding: 6px 1px;
    }
    
    .coc-day-cell {
        min-height: 50px;
    }
    
    .coc-day-number {
        font-size: 11px;
    }
}