
//colors
$white: #fff;
$color_silver_chalice_approx: #aaa;
$gallery: #efefef;
$color_boulder_approx: #777;
$wild_sand: #f4f4f4;
$color_mine_shaft_approx: #333;
$color_martini_approx: #999;
$color_havelock_blue_approx: #4b96e6;
$color_silver_approx: #ccc;
$color_gallery_approx: #eee;
$color_alto_approx: #ddd;
$color_link_water_approx: #edf4fc;

//urls
$url_0: url(data:image/png;base64,[encoded data, 4632 characters]);

%extend_1 {
    overflow: hidden;
    display: inline-block;
    width: 1px;
    height: 1px;
    line-height: 300px;
    background: $url_0 no-repeat;
}


%extend_2 {
    overflow: hidden;
    position: absolute;
    top: 50%;
    margin-top: -5px;
    line-height: 400px;
    background: $url_0 no-repeat;
    content: '';
}

//original selectors
//.tui-calendar .tui-calendar-btn-prev-month:after, .tui-calendar.tui-calendar-month .tui-calendar-btn-prev-year:after
%extend_3 {
    width: 6px;
    height: 11px;
    left: 50%;
    margin-left: -3px;
    background-position: 0 0;
}

//original selectors
//.tui-calendar .tui-calendar-btn-next-month:after, .tui-calendar.tui-calendar-month .tui-calendar-btn-next-year:after
%extend_4 {
    width: 6px;
    height: 11px;
    right: 50%;
    margin-right: -3px;
    background-position: -8px 0;
}

//original selectors
//.tui-calendar th, .tui-calendar td
%extend_5 {
    height: 39px;
    text-align: center;
    color: $color_martini_approx;
}

//original selectors
//.tui-datepicker-body .tui-timepicker, .tui-datepicker-footer .tui-timepicker
%extend_6 {
    width: 274px;
    position: static;
    padding: 20px 46px 20px 47px;
    border: 0;
}


@charset "utf-8";
.tui-calendar {
    position: relative;
    background-color: $white;
    border: 1px solid $color_silver_chalice_approx;
    width: 274px;
    * {
                box-sizing: border-box;
    }
    div {
        text-align: center;
    }
    caption {
        padding: 0;
        span {
            overflow: hidden;
            position: absolute;
            clip: rect(0 0 0 0);
            width: 1px;
            height: 1px;
            margin: -1px;
            padding: 0;
        }
    }
    button {
        appearance: none;
    }
    .tui-calendar-header {
        position: relative;
        border-bottom: 1px solid $gallery;
    }
    .tui-calendar-header-inner {
        padding: 17px 50px 15px;
        height: 50px;
    }
    .tui-calendar-title-today {
        height: 30px;
        margin: 0;
        font-size: 12px;
        line-height: 34px;
        color: $color_boulder_approx;
        background-color: $wild_sand;
    }
    .tui-calendar-title {
        display: inline-block;
        font-size: 18px;
        font-weight: normal;
        font-style: normal;
        line-height: 1;
        color: $color_mine_shaft_approx;
        cursor: default;
        vertical-align: top;
    }
    .tui-calendar-btn-prev-month {
        left: 0;
        &:after {
            @extend %extend_2;
            @extend %extend_3;
        }
    }
    .tui-calendar-btn-next-month {
        right: 0;
        &:after {
            @extend %extend_2;
            @extend %extend_4;
        }
    }
    .tui-calendar-btn-prev-year {
        left: 0;
        &:after {
            @extend %extend_2;
            width: 11px;
            height: 10px;
            left: 50%;
            margin-left: -6px;
            background-position: -16px -36px;
        }
    }
    .tui-calendar-btn-next-year {
        right: 0;
        &:after {
            @extend %extend_2;
            width: 11px;
            height: 10px;
            right: 50%;
            margin-right: -6px;
            background-position: -16px -49px;
        }
    }
    &.tui-calendar-month {
        .tui-calendar-btn-prev-year {
            width: 50px;
            &:after {
                @extend %extend_3;
            }
        }
        .tui-calendar-btn-next-year {
            width: 50px;
            &:after {
                @extend %extend_4;
            }
        }
    }
    .tui-calendar-has-btns {
        .tui-calendar-btn-prev-year {
            left: 10px;
        }
        .tui-calendar-btn-next-year {
            right: 10px;
        }
        .tui-calendar-btn-prev-month {
            left: 44px;
        }
        .tui-calendar-btn-next-month {
            right: 44px;
        }
    }
    .tui-calendar-body-inner {
        width: 100%;
        margin: 0 auto;
        table-layout: fixed;
        border-collapse: collapse;
        text-align: center;
        font-size: 12px;
    }
    th {
        font-weight: normal;
        cursor: default;
        @extend %extend_5;
    }
    td {
        @extend %extend_5;
    }
    .tui-calendar-month {
        width: 25%;
        height: 50px;
    }
    .tui-calendar-today {
        color: $color_havelock_blue_approx;
    }
    .tui-calendar-prev-month {
        color: $color_silver_approx;
        &.tui-calendar-date {
            visibility: hidden;
        }
    }
    .tui-calendar-next-month {
        color: $color_silver_approx;
        &.tui-calendar-date {
            visibility: hidden;
        }
    }
    .tui-calendar-btn-choice {
        background-color: $color_havelock_blue_approx;
    }
    .tui-calendar-btn-close {
        background-color: $color_boulder_approx;
    }
    .tui-calendar-year {
        width: 25%;
        height: 50px;
    }
    &.tui-calendar-year {
        .tui-calendar-btn-prev-year {
            width: 50px;
            &:after {
                width: 6px;
                height: 11px;
                left: 50%;
                margin-left: -3px;
                background-position: 0 0;
            }
        }
        .tui-calendar-btn-next-year {
            width: 50px;
            &:after {
                width: 6px;
                height: 11px;
                right: 50%;
                margin-right: -3px;
                background-position: -8px 0;
            }
        }
    }
    .tui-calendar-body-header th {
        color: $color_boulder_approx;
    }
    .tui-is-blocked:hover {
        cursor: default;
    }
}
.tui-datepicker-dropdown {
    display: inline-block;
    width: 120px;
    position: relative;
    button {
        appearance: none;
    }
    .tui-ico-check {
        @extend %extend_1;
    }
    .tui-dropdown-button {
        width: 100%;
        height: 28px;
        padding: 0 10px;
        font-size: 12px;
        line-height: 20px;
        border: 1px solid $color_alto_approx;
        padding: 0 30px 0 10px;
        text-align: left;
        background: $white;
        cursor: pointer;
    }
    .tui-ico-caret {
        position: absolute;
        top: 12px;
        right: 10px;
    }
    .tui-dropdown-menu {
        display: none;
        position: absolute;
        top: 27px;
        left: 0;
        right: 0;
        width: 100%;
        padding: 5px 0;
        margin: 0;
        overflow-y: auto;
        min-width: 0;
        max-height: 198px;
        font-size: 12px;
        border: 1px solid $color_alto_approx;
        border-top-color: $white;
        z-index: 10;
        //Instead of the line below you could use @include box-sizing($bs)
        box-sizing: border-box;
        //Instead of the line below you could use @include box-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)
        box-shadow: none;
        //Instead of the line below you could use @include border-radius($radius, $vertical-radius)
        border-radius: 0;
    }
    &.tui-is-open {
        .tui-dropdown-button {
            display: block;
            display: block;
            border-color: $color_silver_chalice_approx;
        }
        .tui-dropdown-menu {
            display: block;
            border-color: $color_silver_chalice_approx;
        }
        .tui-ico-caret {
            background-position: -21px -28px;
        }
    }
    .tui-menu-item {
        overflow: hidden;
        position: relative;
        height: 28px;
        line-height: 28px;
        background-color: $white;
        z-index: 10;
        .tui-ico-check {
            display: none;
            overflow: hidden;
            position: absolute;
            width: 10px;
            height: 8px;
            top: 10px;
            left: 10px;
            background-position: -31px -54px;
            z-index: 10;
            content: 'aaa';
        }
        &.tui-is-selected {
            .tui-ico-check {
                display: block;
            }
            .tui-menu-item-btn {
                font-weight: bold;
            }
        }
    }
    .tui-menu-item-btn {
        position: relative;
        width: 100%;
        font-size: 12px;
        font-weight: normal;
        line-height: 28px;
        padding: 0 10px 0 30px;
        text-align: left;
        color: $color_mine_shaft_approx;
        background-color: $white;
        border: 0;
        cursor: pointer;
        z-index: 9;
        &:hover {
            color: $color_mine_shaft_approx;
            background-color: $wild_sand;
        }
    }
}
.tui-datepicker-selector {
    padding: 10px;
    font-size: 0;
    text-align: center;
    border-bottom: 1px solid $color_gallery_approx;
    button {
        appearance: none;
    }
}
.tui-ico-date {
    @extend %extend_1;
    width: 12px;
    height: 12px;
    background-position: -17px 0;
}
.tui-ico-time {
    @extend %extend_1;
    width: 12px;
    height: 12px;
    background-position: 0 -30px;
}
.tui-ico-caret {
    @extend %extend_1;
    width: 7px;
    height: 4px;
    background-position: 0 -58px;
}
.tui-calendar-month {
    width: 202px;
    .tui-calendar-body {
        width: 202px;
        margin: 0 auto;
    }
}
.tui-calendar-year {
    width: 202px;
    .tui-calendar-body {
        width: 202px;
        margin: 0 auto;
    }
}
.tui-calendar-btn {
    overflow: hidden;
    position: absolute;
    top: 0;
    width: 32px;
    height: 50px;
    line-height: 400px;
    z-index: 10;
    cursor: pointer;
    border: none;
    background-color: $white;
}
.tui-datepicker {
    border: 1px solid $color_silver_chalice_approx;
    background-color: $white;
    position: absolute;
    * {
        //Instead of the line below you could use @include box-sizing($bs)
        box-sizing: border-box;
    }
    .tui-calendar {
        border: 0;
    }
    .tui-calendar-title {
        cursor: pointer;
        &.tui-calendar-title-year-to-year {
            cursor: auto;
        }
    }
    .tui-is-blocked {
        cursor: default;
        color: $color_alto_approx;
    }
    .tui-is-valid {
        color: $color_martini_approx;
    }
    .tui-is-selectable {
        &:hover {
            background-color: $color_link_water_approx;
            cursor: pointer;
        }
        &.tui-is-selected {
            background-color: $color_havelock_blue_approx;
            color: $white;
        }
    }
    &.tui-rangepicker {
        .tui-is-selected-range {
            background-color: $color_link_water_approx;
        }
        .tui-is-selectable.tui-is-selected {
            background-color: $color_havelock_blue_approx;
            color: $white;
        }
    }
}
.tui-datepicker-type-date {
    width: 274px;
}
.tui-datepicker-body {
    .tui-calendar-month {
        width: auto;
    }
    .tui-calendar-year {
        width: auto;
    }
    .tui-timepicker {
        @extend %extend_6;
    }
}
.tui-datepicker-selector-button {
    width: 50%;
    height: 26px;
    font-size: 12px;
    line-height: 23px;
    border: 1px solid $color_alto_approx;
    background-color: $white;
    color: $color_boulder_approx;
    outline: none;
    cursor: pointer;
    &.tui-is-checked {
        background-color: $color_gallery_approx;
        color: $color_mine_shaft_approx;
        .tui-ico-date {
            background-position: -17px -14px;
        }
        .tui-ico-time {
            background-position: 0 -44px;
        }
    }
    [class^=tui-ico-] {
        margin: 5px 9px 0 0;
        vertical-align: top;
    }
    + .tui-datepicker-selector-button {
        margin-left: -1px;
    }
}
.tui-datepicker-input {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 28px;
    vertical-align: top;
    border: 1px solid $color_alto_approx;
    &.tui-has-focus {
        border-color: $color_silver_chalice_approx;
        .tui-ico-date {
            background-position: -17px -14px;
        }
    }
    * {
        //Instead of the line below you could use @include box-sizing($bs)
        box-sizing: border-box;
    }
    > input {
        width: 100%;
        height: 100%;
        padding: 6px 27px 6px 10px;
        font-size: 12px;
        line-height: 14px;
        vertical-align: top;
        border: 0;
        color: $color_mine_shaft_approx;
    }
    > .tui-ico-date {
        position: absolute;
        top: 50%;
        right: 8px;
        margin: -6px 0 0;
    }
}
.tui-datepicker-area {
    position: relative;
}
.tui-datetime-input {
    width: 170px;
}
.tui-menu-item-btn {
    &:focus {
        color: $color_mine_shaft_approx;
        background-color: $wild_sand;
    }
    &:active {
        color: $color_mine_shaft_approx;
        background-color: $wild_sand;
    }
}
.tui-dropdown-area {
    font-size: 0;
    .tui-datepicker-dropdown + .tui-datepicker-dropdown {
        margin-left: 5px;
    }
}
.tui-hidden {
    display: none;
}
.tui-datepicker-footer .tui-timepicker {
    @extend %extend_6;
    border-top: 1px solid $color_gallery_approx;
}

