:root {
    --border-day-color: #bbbbbb;
    --border-week-color: #909090;
    --border-week-legend-color: #909090;
    --border-weekend-color: #909090;
    --border-month-color: #909090;
}

.calendar {
    width: calc(100% - 1em);
    margin: 0.5em;
}

.calendar * {
}

.weeks {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.week {
    display: flex;
    justify-content: stretch;
    min-height: calc((100vh - 95px) / 6);
}

.weeks.num-weeks-5 .week {
    min-height: calc((100vh - 95px) / 5);
}

.week.legend {
    border-bottom: 3px solid var(--border-week-legend-color);
    min-height: unset !important;
}

.day {
    display: flex;
    flex-direction: column;
    width: calc(100% / 7);
    flex-grow: 0;
    flex-shrink: 0;
    border-left: 1px solid var(--border-day-color);
    border-bottom: 1px solid var(--border-week-color);
    overflow: hidden;
    padding: 0;
}

.week.legend .day {
    padding: 5px 4px 5px 4px;
}

.day.first-of-month {
    border-left: 6px solid var(--border-month-color) !important;
    font-weight: bold;
}

.day.Saturday, .day.Sunday {
    background: #dddddd;
}

.day.even-month {
    background: #eeeeee;
}

.day.even-month.Saturday, .day.even-month.Sunday {
    background: #cccccc;
}

.day.Saturday {
    border-left: 3px solid var(--border-weekend-color);
}

.day:last-child {
    border-right: 1px solid var(--border-weekend-color);
}

.week:first-child .day {
    border-top: 1px solid var(--border-weekend-color);
}

.day .label, .week.legend .day {
}

.day.today {
    background: rgba(255, 255, 0, 0.1);
    border: 2px solid #fafe0c;
}

.week.legend .day {
    padding: 5px 2px;
}

.day-events {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.day-event {
    width: 100%;
    font-size: 11px;
    padding: 0;
    margin-top: 6px;
    cursor: pointer;
    padding: 0 5px 5px 5px;
    margin-bottom: 5px;
    border-bottom: 1px dotted #cccccc;
}

.day-event.not-chargeable, .day-event.not-chargeable * {
    filter: saturate(0);
    opacity: 0.75;
}

.day-event:hover {
    opacity: 0.5;
}

.day-event:last-child {
    margin-bottom: 0;
}

.legend .day {
    font-weight: 600;
    font-size: 1.1em;
}

.calendar .config {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.calendar .config :last-child {
    margin-left: auto;
}

.calendar .events {
    margin-bottom: 20px;
}

.calendar input[type=date],
.calendar button {
    height: 24px;
}

.calendar .help {
    color: #006bff
}

.calendar .messages {
    background: #ffe992;
    padding: 20px;
    margin-bottom: 10px;
}

.calendar .user.initials {
    display: inline-flex;
    font-size: 11px;
    width: 17px;
    height: 17px;
    line-height: 17px;
    margin: 0;
    margin-right: 5px;
}

.calendar .work-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.calendar .client {
    font-size: 12px;
    font-weight: bold;
}

.calendar-controls button {
    margin: 10px;
    width: 90px;
    border: 1px solid #aaaaaa;
    height: 36px;
}

.calendar .work-times-total.initials {
    font-size: 12px;
    display: inline-flex;
    width: unset;
    border-radius: 3px;
    padding: 0 5px 0 5px;
    border: none;
    font-weight: 400;
    height: unset;
    margin-left: auto;
}

.calendar .work-item-times {
    color: #008292;
    padding-top: 2px;
}

.calendar .day .label .date {
    padding: 0 10px;
}

.calendar .week.legend .day .label {
    padding: 0 10px;
}

.calendar .day.today .label .date {
    background: #ff2496;
    display: inline-block;
    color: #ffffff;
    font-weight: 900;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.calendar .day .label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar .item-action.quick-add {
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 50%;
    width: 1.5em;
    height: 1.5em;
}

.calendar .item-action.quick-add:hover {
    border: 1px solid #909090;
    background: var(--button-bg);
    color: #006bff;
}

.calendar .day-event.it-Support {
    filter: saturate(0);
    opacity: 0.5;
}

.calendar .day-event.block-billed {
    filter: saturate(0);
    opacity: 0.5;
}

.calendar .day .label .month {
    background: #2965ff;
    color: #ffffff;
    padding: 0 0.5em;
    border-bottom-left-radius: 1em;
    border-bottom-right-radius: 1em;
    text-align: center;
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-totals {
    display: flex;
}

.calendar-totals > *:not(:last-child) {
    margin-right: 10px;
}

.calendar-totals label {
    font-size: 11px;
    font-weight: bold;
}

.calendar-totals > div > div {
    padding-top: 5px;
    font-size: 20px;
}

.calendar-totals > div {
    padding: 10px;
    background: #3193a624;
}

.calendar-totals > div > div b {
    font-weight: 900;
}

.calendar-totals > div.chargeable > div b {
    color: #068a00;
}

.calendar-totals > div.not-chargeable > div b {
    color: #fe1000;
}

.unbilled-times {
    margin-left: 0.5em;
}

.calendar .day-events.mde > div > div {
    width: 33.333333333333%;
    flex-grow: 0;
    flex-shrink: 0;
}

.calendar .day-events.mde {
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

.calendar .day-events.mde > div {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

.calendar .day-events.mde > div > div > * {
    padding: 0.25em;
}

.calendar .day-events.mde .day-text {
    font-size: 0.8em;
}

.calendar .day-events.mde .day-text, 
.calendar .day-events.mde .day-text-mobile {
    background: #00000010;
}

.calendar .day-events.mde > div > div .day-details {
    font-size: 0.7em;
}

.calendar .day-events.mde > div > div {
    display: flex;
    flex-direction: column;
}

.calendar .day-events.mde .day-text-mobile,
.calendar .day-events.mde .day-details-mobile {
    display: none;
}

@media screen and (max-width:800px) {
    .calendar {
        margin: 0;
        width: 100%;
    }

    .calendar .week {
        min-height: calc((100vh - 150px) / 6);
    }

    .weeks.num-weeks-5 .week {
        min-height: calc((100vh - 150px) / 5);
    }

    .calendar .day-events.mde .day-text {
        display: none;
    }

    .calendar .day-events.mde .day-details {
        display: none;
    }

    .calendar .day-events.mde .day-text-mobile {
        display: block;
        writing-mode: vertical-lr;
        padding: 0.25em 0em;
        position: relative;
        font-size: 0.9em;
        left: -1px;
    }

    .calendar .day-events.mde .day-details-mobile.show {
        display: block;
        font-size: 0.8em;
        margin-top: 0.5em;
    }
}

@media print {
    .calendar-controls, .config, .events, .messages {
        display: none;
    }
}
