.stec-layout-week {
    width: ~"calc(100% - 1px)";
    border-collapse: collapse;
    table-layout: fixed;
    td {
        border: 1px solid @border-color;
        &:first-child {
            border-left: none;
        }
        &:last-child {
            border-right: none;
        }
    }
}

.stec-layout-week-eventholder {
    &:last-child {
        td {
            border-bottom: none;
        }
        .stec-layout-event {
            &:not(.active) {
                &:last-child {
                    border-radius: 0 0 @borders-radius @borders-radius;
                    .stec-layout-event-preview {
                        border-radius: 0 0 @borders-radius @borders-radius;
                    }
                }
            }
        }
    }
}

.stec-layout-week-daylabel {
    height: 45px;
    td {
        border-top: none;
        &:first-child {
            border-top-left-radius: @borders-radius;
        }
        &:last-child {
            border-top-right-radius: @borders-radius;
        }
    }
    p {
        display: none;
        text-align: center;
        line-height: 45px;
        &:first-child {
            display: block;
        }
    }
}

.stec-layout-week-weekrow-last {
    td {
        border-bottom: none;
        &:first-child {
            border-bottom-left-radius: @borders-radius;
            .stec-layout-week-daycell-wrap {
                border-bottom-left-radius: @borders-radius;
            }
        }
        &:last-child {
            border-bottom-left-radius: @borders-radius;
            .stec-layout-week-daycell-wrap {
                border-bottom-right-radius: @borders-radius;
            }
        }
    }
}

.stec-layout-week-daycell {
    height: 160px;
    cursor: pointer;
    .stec-layout-week-daycell-wrap {
        .box(100%);
        float: left;
        position: relative;
        background: #fff;
        .stec-layout-week-daycell-num {
            color: #4d576c;
            position: absolute;
            top: 12px;
            left: 12px;
            text-align: left;
            z-index: 0;
            .box(30px);
            text-align: center;
            line-height: 30px;
        }
    }
    &.stec-layout-week-daycell-today {
        .stec-layout-week-daycell-num {
            text-align: center;
            color: #ffffff;
            &:before {
                background-color: #f15e6e;
                content: "";
                position: absolute;
                z-index: -1;
                border-radius: @borders-radius;
                top: 0;
                left: ~"calc(50% - 15px)";
                padding: 15px;
            }
        }
    }
    &:hover {
        .stec-layout-week-daycell-wrap {
            background: #f0f1f2;
        }
    }
    &.active {
        .stec-layout-week-daycell-eventmore-count {
            color: #ffffff;
        }
        .stec-layout-week-daycell-wrap {
            background: #4d576c;
        }
        &:not(.stec-layout-week-daycell-today) {
            .stec-layout-week-daycell-num {
                color: #ffffff;
            }
        }
    }
}

.stec-layout-week-daycell-events {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 113px;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    .stec-layout-week-daycell-event {
        margin: 0;
        padding: 0;
        width: ~"calc(100% - 2px)";
        margin-left: 1px;
        height: 25px;
        overflow: hidden;
        position: absolute;
        top: 0;
        &.stec-layout-week-daycell-event-expired {
            opacity: 0.5;
        }
        &[data-pos="2"] {
            top: 29px;
        }
        &[data-pos="3"] {
            top: 58px;
        }
        &.stec-layout-week-daycell-event-start {
            border-top-left-radius: @borders-radius;
            border-bottom-left-radius: @borders-radius;
            width: ~"calc(100% - 9px)";
            margin-left: 8px;
            &.stec-layout-week-daycell-event-end {
                width: ~"calc(100% - 16px)";
                margin-left: 8px;
                margin-right: 8px;
            }
        }
        &.stec-layout-week-daycell-event-end {
            border-top-right-radius: @borders-radius;
            border-bottom-right-radius: @borders-radius;
            width: ~"calc(100% - 9px)";
            margin-right: 8px;
        }
        .stec-layout-week-daycell-event-name {
            float: left;
            text-align: left;
            padding: 0 10px;
            line-height: 25px;
            text-transform: uppercase;
            height: inherit;
        }

        &.stec-event-cancelled {
            .stec-layout-week-daycell-event-name{
                text-decoration: line-through;
            }
        }
    }
    .stec-layout-week-daycell-eventmore {
        width: ~"calc(100% - 2px)";
        margin-left: 1px;
        height: 25px;
        overflow: hidden;
        position: absolute;
        bottom: 1px;
        .stec-layout-week-daycell-eventmore-count-dot {
            display: none;
            .box(4px);
            border-radius: @borders-radius;
            margin-left: 1px;
            float: left;
        }
        .stec-layout-week-daycell-eventmore-count {
            float: left;
            text-align: center;
            text-indent: 15px;
            line-height: 25px;
            text-transform: uppercase;
        }
    }
}