#simple-calendar {
    max-width: 600px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    text-align: center;
}

/* Заголовок с годом и месяцем */
.upc-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Блок с кнопками переключения месяцев и режимов */
#calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

#calendar-header button {
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    background-color: #9e9e9e;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#calendar-header button:hover {
    background-color: #ddd;
}

/* Переключатель "Месяц"/"Неделя" */
#calendar-toggle {
    display: flex;
    justify-content: center;
    gap: 5px;
}

#calendar-toggle button {
    padding: 5px 15px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #9e9e9e;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#calendar-toggle button.active {
    background-color: #6878D6;
    color: white;
}

#calendar-toggle button:hover {
    background-color: #ddd;
    color: black;
}

/* Сетка календаря */
#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
}

/* Ячейки календаря */
.calendar-cell {
    min-height: 80px;
    padding: 5px;
    border: 1px solid #ccc;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    font-size: 14px;
    position: relative;
}

/* Числа в ячейках */
.calendar-cell > span {
    position: absolute;
    top: 10px;
    right: 10px;
    font-weight: bold;
    z-index: 2;
}

/* Пустые ячейки */
.calendar-cell.empty {
    background: #f9f9f9;
    border: none;
}

/* Ячейки с днями недели */
.calendar-cell.day-name {
    min-height: 26px;
    font-weight: bold;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    font-size: 12px;
    padding: 2px 8px;
    color: #333;
}

/* Текущий день */
.calendar-cell.current-day {
    position: relative;
    color: #fff;
    font-weight: bold;
}

.calendar-cell.current-day::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 80%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #6878D6;
    border-radius: 50%;
    z-index: 1;
}

/* Недельный режим #e60026 - красный */
/* Дни недели в недельной сетке */
#calendar-grid.week-view .calendar-cell.day-name {
    min-height: 26px;
}

/* Числа в недельной сетке */
#calendar-grid.week-view .calendar-cell:not(.day-name) {
    min-height: 320px;
    height: auto;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Регулируем стиль текущего дня */
#calendar-grid.week-view .calendar-cell.current-day::before {
    top: 7%;
    left: 80%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-color: #6878D6;
    border-radius: 50%;
    z-index: 2;
}

/* Большая ячейка */
.calendar-large-cell {
    width: calc(100% - 20px);
    max-width: 670px;
    height: 400px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    box-sizing: border-box;
    position: fixed;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 1000;
    border-radius: 5px; /* Скругляем углы */
}

/* Кнопка назад */
.calendar-back-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #6878D6;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    z-index: 10;
}

.calendar-back-button:hover {
    background-color: #cc0020;
}

/* Текст внутри большой ячейки */
.calendar-large-cell-text {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.calendar-large-cell ul {
    margin-top: 40px; /* Отступ сверху для списка постов */
}

.no-posts {
    margin-top: 60px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

/* Контейнер для кругов */
/*.circle-container {
    position: absolute;
    bottom: 5px; /* Расположение снизу */
    /*left: 5px; /* Расположение слева */
    /*display: flex;
    /*flex-direction: column-reverse; /* Располагаем круги снизу вверх */
    /*gap: 3px; /* Интервал между кругами */
/*}*/

/* Круги для постов */
.post-circle {
    width: 10px;
    height: 10px;
    background-color: #6878D6;
    border-radius: 50%;
}

/* Стиль для текста " (+N) " */
/*.extra-posts {
    font-size: 10px;
    color: #6878D6;
    margin-top: 4px;
    margin-left: 5px; /* Расстояние от последнего круга */
/*}*/

/* Обёртка для кружков и (+N) */
.circle-wrapper {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Контейнер для кружков */
.circle-container {
    display: flex;
    flex-direction: column-reverse; /* Кружки располагаются снизу вверх */
    gap: 3px;
}

/* Контейнер для дополнительного текста */
.extra-container {
    display: flex;
    align-items: flex-end;
}

/* Стили для (+N) */
.extra-posts {
    font-size: 10px;
    color: #6878D6;
    background: rgba(255, 255, 255, 0.8); /* Фон для лучшей читаемости */
    padding: 2px 4px;
    border-radius: 3px;
}


/* Красные прямоугольники в недельных ячейках */
.post-rectangle {
    position: absolute;
    height: 20px;
    background-color: #6878D6;
    border-radius: 3px;
    left: 5px;
    right: 5px;
    color: white; /* Белый текст для контраста */
    font-size: 12px;
    line-height: 20px; /* Высота текста совпадает с высотой прямоугольника */
    text-align: center;
    overflow: hidden;
    white-space: nowrap; /* Однострочный текст */
    text-overflow: ellipsis; /* Добавляем многоточие для обрезанного текста */
    padding: 0 5px; /* Отступы внутри прямоугольника */
}












