﻿:root {
    --dnet-datepickerweek-input-container-border: 1px solid #eee;
    --dnet-datepickerweek-input-height: 28px;
    --dnet-datepickerweekca-day-height: 30px;
    --dnet-datepickerweekca-day-disabled-color: rgba(0,0,0,.38);
    --dnet-datepickerweekca-selected-bg-color: #42b0d5;
    --dnet-datepickerweekca-today-bg-color: rgba(0,0,0,.1);
}

.dnet-datepickerweek-content {
    box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.1), 0 1px 10px 0 rgba(0, 0, 0, 0.1);
    background: #fff;
    color: rgba(0,0,0,.87);
}

.dnet-datepickerweek-input-container {
    display: flex;
    border: var(--dnet-datepickerweek-input-container-border);
    justify-content: space-between;
}

.dnet-datepickerweek-input-search {
    width: 100%;
    border-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background-color: #FFFFFF;
    -webkit-transition: none;
    transition: none;
    box-shadow: none;
    font-size: 0.875rem;
    color: #5f6368;
    border: 0px solid #eee !important;
    height: var(--dnet-datepickerweek-input-height);
    outline: none;

    &:focus {
        box-shadow: 0 0 0 0rem rgba(0,123,255,.25);
    }
}

.dnet-datepickerweek-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: var(--dnet-datepickerweek-input-height);
    width: var(--dnet-datepickerweek-input-height);
}

.dnet-datepickerweek-icon {
    display: block;
    background-repeat: no-repeat;
    background-size: 1em 1em;
    height: 1em;
    width: 1em;
    cursor: pointer;
    color: #5f6368;
}

.dnet-datepickerweek-icon-default {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'><path fill-rule='evenodd' clip-rule='evenodd' d='M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1zm1-3a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z'/></svg>");
}

.dnet-datepickerweek-disable {
    .dnet-datepickerweek-icon-default {
        background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='grey'><path fill-rule='evenodd' clip-rule='evenodd' d='M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1zm1-3a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z'/></svg>");
    }

    .dnet-datepickerweek-icon-wrapper {
        background-color: #e9ecef;
    }
}

.dnet-datepickerweekca-header {
    padding: 0 8px 0 8px;
}

.dnet-datepickerweekca-controls {
    display: flex;
    margin: 5% calc(33% / 7 - 16px);
}

.dnet-datepickerweekca-period-button {
    min-width: 0;
    font-size: .875rem;
    font-weight: 500;

    &:focus {
        outline: none;
    }

    &:hover {
        background-color: rgba(0,0,0,.05);
    }
}

.dnet-datepickerweekca-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    margin: 0 0 0 5px;
    vertical-align: middle;
    border-top-color: rgba(0,0,0,.54);
}

.dnet-datepickerweekca-arrow-down {
    border-bottom-width: 5px;
    border-bottom-style: solid;
}

.dnet-datepickerweekca-arrow-up {
    border-top-width: 5px;
    border-top-style: solid;
}

.dnet-datepickerweekca-previous-button, .dnet-datepickerweekca-next-button {
    position: relative;

    &:hover:not(button[disabled]) {
        padding: 0;
        min-width: 0;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        line-height: 40px;
        border-radius: 50%;
        background-color: rgba(0,0,0,.05);
    }
}

.dnet-datepickerweekca-previous-button::after, .dnet-datepickerweekca-next-button::after {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
    content: "";
    margin: 15.5px;
    border: 0 solid currentColor;
    border-top-width: 2px;
    color: rgba(0,0,0,.54);
    outline: none;
}

button:disabled,
button[disabled] {
    &.dnet-datepickerweekca-previous-button {
        &::after {
            color: rgba(16, 16, 16, 0.3);
        }
    }

    &.dnet-datepickerweekca-next-button {
        &::after {
            color: rgba(16, 16, 16, 0.3);
        }
    }
}

.dnet-datepickerweekca-previous-button::after {
    border-left-width: 2px;
    transform: translateX(2px) rotate(-45deg);
}

.dnet-datepickerweekca-next-button::after {
    border-right-width: 2px;
    transform: translateX(-2px) rotate(45deg);
}


.dnet-datepickerweekca-spacer {
    flex: 1 1 auto;
}

.dnet-datepickerweekca-content {
    padding: 0 8px 4px 8px;
    outline: none;
}

.dnet-datepickerweekca-body {
    min-width: 224px;
    font-size: 13px;
}

.dnet-datepickerweekca-body-label, .dnet-datepickerweekca-period-button {
    font-size: 14px;
    font-weight: 500;
}

.dnet-datepickerweekca-content-header {
    display: flex;
    color: rgba(0,0,0,.38);
    padding: 0px 0px 0 0px;
}

.dnet-datepickerweekca-content-header-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 0px 0;
    font-size: 11px;
    font-weight: 400;
    color: rgba(0,0,0,.38);
    height: 21px;
    width: var(--dnet-datepickerweekca-day-height);
}

.dnet-datepickerweekca-content-body {
    display: grid;
    grid-template-columns: repeat(7, var(--dnet-datepickerweekca-day-height));
    grid-template-rows: repeat(6, var(--dnet-datepickerweekca-day-height));
    min-width: 224px;
    font-size: 13px;
}

.dnet-datepickerweekca-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 30px;
}

.dnet-datepickerweekca-day-content {
    top: 5%;
    left: 5%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 90%;
    line-height: 1;
    border-width: 1px;
    border-style: solid;
    color: rgba(0,0,0,.87);
    border-color: transparent;
    cursor: pointer;

   /* &:hover:not(.dnet-datepickerweekca-day-selected) {
        background-color: rgba(0,0,0,.04);
        cursor: pointer;

        &.disabled {
            background-color: #FFFFFF;
            cursor:default;
        }
    }*/

    &.disabled {
        color: var(--dnet-datepickerweekca-day-disabled-color);
    }
}

.dnet-datepickerweekca-day-content.hovered:not(.dnet-datepickerweekca-day-selected) {
    background-color: rgba(0,0,0,.04);
}

.dnet-datepickerweekca-day-selected {
    color: #FFFFFF;
    background-color: var(--dnet-datepickerweekca-selected-bg-color);
}

.dnet-datepickerweekca-day-today:not(.dnet-datepickerweekca-day-selected) {
    box-shadow: inset 0 0 0 1px #fff;
    background-color: var(--dnet-datepickerweekca-today-bg-color);
}

.dnet-datepickerweekca-day-selected {
    &.dnet-datepickerweekca-day-today {
        box-shadow: inset 0 0 0 1px #fff;
    }
}

.dnet-datepickerweekca-content-body-year {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    min-width: 224px;
    font-size: 13px;
}

.dnet-datepickerweekca-year {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 70px;
}

.dnet-datepickerweekca-year-content {
    top: 5%;
    left: 5%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 90%;
    height: 90%;
    line-height: 1;
    border-width: 1px;
    border-style: solid;
    border-radius: 999px;
    color: rgba(0,0,0,.87);
    border-color: transparent;
    cursor: pointer;

    &:hover:not(.dnet-datepickerweekca-year-selected) {
        background-color: rgba(0,0,0,.04);
        cursor: pointer;

        &.disabled {
            background-color: #FFFFFF;
            cursor: default;
        }
    }

    &.disabled {
        color: var(--dnet-datepickerweekca-day-disabled-color);
    }
}

.dnet-datepickerweekca-year-selected {
    color: #FFFFFF;
    background-color: var(--dnet-datepickerweekca-selected-bg-color);
}

.dnet-datepickerweekca-year-today:not(.dnet-datepickerweekca-year-selected) {
    box-shadow: inset 0 0 0 1px #fff;
    background-color: rgba(0,0,0,.1);
}

.dnet-datepickerweekca-year-selected {
    &.dnet-datepickerweekca-year-today {
        box-shadow: inset 0 0 0 1px #fff;
    }
}

.dnet-datepickerweekca-content-body-month {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    min-width: 224px;
    font-size: 13px;
}

.dnet-datepickerweekca-month {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 70px;
}

.dnet-datepickerweekca-month-content {
    top: 5%;
    left: 5%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 90%;
    height: 90%;
    line-height: 1;
    border-width: 1px;
    border-style: solid;
    border-radius: 999px;
    color: rgba(0,0,0,.87);
    border-color: transparent;

    &:hover {
        background-color: rgba(0,0,0,.04);
        cursor: pointer;

        &.disabled {
            background-color: #FFFFFF;
            cursor: default;
        }
    }

    &.disabled {
        color: var(--dnet-datepickerweekca-day-disabled-color);
    }
}

.dnet-datepickerweekca-month-selected {
    color: #FFFFFF;
    background-color: var(--dnet-datepickerweekca-selected-bg-color);
}

.dnet-datepickerweekca-month-today:not(.dnet-datepickerweekca-month-selected) {
    box-shadow: inset 0 0 0 1px #fff;
    background-color: rgba(0,0,0,.1);
}

.dnet-datepickerweekca-month-selected {
    &.dnet-datepickerweekca-month-today {
        box-shadow: inset 0 0 0 1px #fff;
    }
}

.dnet-datepickerweekca-header-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 0 8px;
    height: 20px;
}

.dnet-datepickerweek-reset-button-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dnet-datepickerweek-reset-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.2em;
    width: 1.2em;
    padding-top: 2px;
}

.dnet-datepickerweek-icon {
    display: block;
    background-repeat: no-repeat;
    background-size: 1em 1em;
    height: 1em;
    width: 1em;
    cursor: pointer;
    color: #5f6368;
}

.dnet-datepickerweek-reset-button {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'><path fill-rule='evenodd' clip-rule='evenodd' d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/></svg>");
}

.dnet-datepickerweek-reset-test {
    font-size: .75rem;
}
