/* Основное */
.widget:has(.events-calendar) {
    padding: 0;
    max-width: 350px;
}
.full-calendar-content-sidebar {
    padding: 0;
    max-width: 350px;
    width: 100%;
    height: max-content;
}
.events-calendar {
    background-color: #F7F8FA;
    border-radius: 10px;
    box-shadow: 0 0 2px rgba(209, 209, 209, 0.18);
    /*padding: 12px 40px 12px 40px;*/
}
.events-calendar__top_header {
    background-color: transparent;
    border-radius: 10px;
    padding: 12px 40px 0 40px;
}
.events-calendar__top_header .events-calendar__top_header_title {
    text-align: center;
    font-size: 24px;
    line-height: 60px;
}
.calendar__content {
    width: 100%;
    padding: 0 40px 40px;
    min-height: 384px;
}
.calendar__content.overflow {
    overflow-y: auto;
    max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: #373A4C #F7F8FA;
}

.calendar__content .events-calendar__page-main {
    width: 100%;
}
.calendar__content .event-calendar__page-dayinfo {

}



.calendar-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.calendar-page-month {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}
.calendar-page-month-help {
    margin-left: auto;
    width: 16px;
    height: 16px;
    background-color: #FFCA10;
    font-size: 12px;
    line-height: 15px;
    text-align: center;
    border-radius: 8px;
    user-select: none;
    cursor: pointer;
    position: relative;
    top: 2px;
}
.calendar-slide-btn {
    cursor: pointer;
}
.calendar-page-month .calendar-slide-btn {
    border-radius: 20px;
    width: 21px;
    height: 21px;
}
.calendar-page-month .calendar-current-date {
    margin-left: 20px;
    margin-right: 20px;
    position: relative;
    top: 1px;
}


.calendar__grid {
    user-select: none;
}
.calendar__grid .calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    aspect-ratio: 1 / 1;
    transition: 0.3s;
    cursor: pointer;
    width: 30px;
    height: 30px;
    padding: 4px;
}

.calendar__grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    justify-items: center;
    align-items: center;
    gap: 10px 10px;
    margin-bottom: 10px;
}
.calendar__grid-header .calendar-day {
    color: #373A4C;
}


.calendar__grid-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    justify-items: center;
    align-items: center;
    gap: 17px 10px;
}
.calendar__grid-body .calendar-day {
    background-color: #fff;
}
.calendar__grid-body .calendar-day:hover {
    background-color: #D8DAE7;
}

.calendar__grid-body .calendar-day.day-not-current-month {
    background-color: #f3f3f3;
    color: #a6a6a6;
    visibility: hidden;
}
.calendar__grid-body .calendar-day.day-current {
    border: 1px solid #E04265;
}
.calendar-day .calendar-day-number {
    line-height: 20px;
}
.calendar-day .calendar-day-tags {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 65%;
}
.calendar-day .calendar-day-tags .calendar-day-tag {
    width: 4px;
    height: 4px;
    background-color: #0a9822;
    border-radius: 5px;
}
.hidden {
    display: none;
}

/** Страница дня */

.calendar_day_events {
}
.event-calendar__page-dayinfo {
    /*max-height: 200px;*/
}

.calendar_day_event {
    width: 100%;
    margin-bottom: 12px;
}
.full-calendar-near-events-wrapper .calendar_day_event {
    margin-bottom: 20px;
}
.calendar_day_event hr {
    width: 100%;
    border-top: 1px solid #D8DAE7;
    margin: 0;
}
.calendar_day_event:last-child hr {
    display: none;
}
.calendar_day_event .day_event-image {
    margin-bottom: 10px;
}
.calendar_day_event .day_event-image img {
    width: 100%;
    border-radius: 10px;
}
.calendar_day_event .day_event-data {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
    font-size: 12px;
}
.day_event-data .day_event-tag {
    width: 7px;
    height: 7px;
    border-radius: 10px;
    background-color: #de4164;
    margin-right: 10px;
    min-width: 7px;
    min-height: 7px;
}
.day_event-data .day_event-text {
    line-height: 22px;
}
.day_event-text .day_event-text-title {
    font-weight: bold;
}
.day_event-text .day_event-text-field p, .day_event-text .day_event-text-field div, .day_event-text .day_event-text-field span {
    margin: 0;
    padding: 0;
}


.calendar-legend-wrapper {
    position: absolute; /* Позиционирование относительно родителя */
    z-index: 1;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    left: -180px;
    width: 234px;
    border-radius: 10px;
    color: #000;
}
.calendar-legend-wrapper .legend-header {
    text-align: left;
    margin-bottom: 10px;
    font-size: 14px;
}
.calendar-legend-wrapper .legend-tag-wrapper {
    display: flex;
    align-items: center;
}
.legend-tag-wrapper .legend-tag {
    width: 7px;
    height: 7px;
    border-radius: 15px;
    background-color: #de4164;
    margin-right: 10px;
}
.legend-tag-wrapper .legend-desc {
    text-align: left;
}
.legend-tag-wrapper .legend-tag-dash {
    margin-right: 5px;
}




.event-calendar-full-page {
    width: 100%;
}
.full-calendar-near-events-wrapper {
    flex-grow: 1;
    background-color: #F7F8FA;
    margin-right: 45px !important;
    border-radius: 10px;
    padding: 40px 30px 30px 30px;
}
.full-calendar-content-sidebar {
    background-color: #F7F8FA;
    max-width: 350px;
    border-radius: 10px;
    height: max-content;
}
.calendar-near-events-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.calendar-near-events-header .calendar-slide-btn {
    margin-right: 10px;
}
.calendar-near-events-header h3 {
    text-align: center;
    margin: 0;
}
.training-container .widget:has(.events-calendar), .inner-training-page .widget:has(.events-calendar) {
    max-width: none;
    width: 100%;
}
@media (max-width: 920px) {
    .full-calendar-near-events-wrapper {
        flex-direction: column;
        width: 100%;
    }
}
@media screen and (max-width: 920px), only screen and (max-device-width: 920px) {
    .event-calendar-full-page {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }
    .full-calendar-near-events-wrapper {
        margin-right: 0 !important;
        margin-bottom: 45px;
    }
}
@media screen and (max-width: 400px), only screen and (max-device-width: 400px) {
    .events-calendar__top_header {
        padding: 12px 12px !important;
    }

}
@media screen and (max-width: 350px), only screen and (max-device-width: 350px) {
    .events-calendar__top_header_title {
        font-size: 16px !important;
    }
    .calendar__content {
        padding: 0 5px 15px !important;
        min-height: auto;
    }
    .calendar__grid-header {
        gap: 10px 3px !important;
    }
    .calendar__grid-body {
        gap: 10px 5px !important;
    }

}