@import (reference) "color.less";
@import (reference) "font.less";
@import (reference) "variables.less";
@import (reference) "index.less";

.calendar {
    .widthAvailable();
    display: flex;
    flex-direction: column;
    height: 100%;

    .head {
        text-align: center;
        padding-left: 16px;        padding-right: 16px;        padding-top: 8px;        padding-bottom: 8px;        font-size: 21px;
    }

    &.calendarYear {
        .months {
            .widthAvailable();
            .heightAvailable();
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: stretch;
            box-sizing: content-box;
            padding: 8px;
            .month {
                min-width: 23%;
                box-sizing: content-box;
                margin: 4px;
                .monthInner {
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    height: 90%;

                    .head {
                        display: flex;
                        padding: 0;                        border: 0;
                        flex-direction: column;

                        label {
                            font-size: 15px;
                            color: var(--color-calendar-label-month);
                            font-weight: 500;
                        }

                        .lineDay {
                            .widthAvailable();
                            color: var(--color-calendar-headline-day);
                            align-items: center;
                            display: flex;
                            justify-content: space-between;
                            font-size: 11px;
                            margin-top: 4px;
                            span {
                                width: 14.2%;
                                text-align: center;
                            }
                        }
                    }

                    .row {
                        .widthAvailable();
                        height: 14.2%;
                        align-items: center;
                        display: flex;
                        justify-content: end;

                        &:last-child {
                            justify-content: flex-start;
                        }

                        .day {
                            width: 14.2%;
                            text-align: center;
                            border-radius: 100px;
                            min-height: 20px;
                            align-items: center;
                            font-size: 13px;
                            display: flex;
                            justify-content: center;
                            cursor: pointer;
                            border: 2px solid transparent;

                            &:hover {
                                background-color: var(--color-primary);
                                color: var(--color-white);
                            }

                            &.today {
                                background: var(--color-calendar-today);
                                border-color: var(--color-calendar-today);

                                &.blocked {
                                    border-color: var(--color-calendar-today);
                                    background: var(--color-calendar-blocked);
                                    //background: linear-gradient(180deg, @colorcalendarBocked 48%, @colorcalendarToday 48%);
                                }
                            }

                            &.blocked {
                                border-color: var(--color-white);
                                background: var(--color-calendar-blocked);
                                color: var(--color-white) !important;
                            }

                            &.endWeek {
                                color: var(--color-calendar-headline-day);
                            }
                        }
                    }
                }
            }
        }
    }
}