
//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,iVBORw0KGgoAAAANSUhEUgAAAC8AAAA+CAYAAAC7rUKSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpERjdGMzkzODVEQkRFNjExQkVCMjlDOUFDNzZDM0E5NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1ODVCRTc4NkM2QkQxMUU2OTgzMzhGQjZFMjcyM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CXknR1WKGp5NXZ+u9iovvxcBSj7RRkSEV80zfztIy4PaYh+1r1QAVUkRpUmgzFSUNdb51Rce+4+NpJ+AhYxQ21Bb6gO6BSuSEchSldohmjVPU44y6zx9fcBVHnDDk3jwpnhOp6cIkiXQNZVRHbWhtgVTlZD6v8LNTPYmPvWYldkazWZ9yKtQopW0yzBniMmNanBxrkVhhntCliTWVOWBCahKxwNobm52fKjZvXt35j5RQFX5IpPUu4tZWcFM0qnKtYhnESsQAQZd0/8Q1uVQlca14hcoE8lA0KAP2pGfqKrUjGb2KXaVfTZlokZu+jW7lKPHRFVuz+MJNpn4dpOTBWuwBbynnOUsnjl5emWeTypDt8NOhPhaJkd/PNX+s0bu9STLllsRfXZuI/T3EhvbaEJyo+CMz+ETF/13TXst+QDnSh9ml7VNfbgsiIrmYtYJlpkZ/dGU0tQ/RvwbUv+oIgn+tolksVywZZ9gEomSpvdB6l0Y6aYoL/CckU1bsAM8gLAocScpPQH7GR9+foG4A3FCpNP/BBgAdZ3B2yZg0vUAAAAASUVORK5CYII=);

%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;
}

