/* https://github.com/bgrins/spectrum */
:host {
    width: 232px;
    height: 240px;
    -webkit-user-select: none;
    overflow: hidden;
}

:host-context(.palettes-enabled) {
    height: 319px;
}

:selection {
    background-color: blue;
    color: white;
}

.spectrum-color {
    position: relative;
    width: 232px;
    height: 124px;
    border-radius: 2px 2px 0 0;
    overflow: hidden;
    flex: none;
}

.spectrum-tools {
    position: relative;
    height: 111px;
    width: 100%;
    flex: none;
}

.spectrum-display-value {
    -webkit-user-select: text;
    display: inline-block;
    padding-left: 2px;
}

.spectrum-hue {
    top: 16px;
}

.spectrum-alpha {
    top: 35px;
    background-image: url(Images/checker.png);
    background-size: 12px 11px;
}

.spectrum-alpha-background {
    height: 100%;
    border-radius: 2px;
}

.spectrum-hue, .spectrum-alpha {
    position: absolute;
    left: 86px;
    width: 130px;
    height: 11px;
    border-radius: 2px;
}

.spectrum-dragger,
.spectrum-slider {
    -webkit-user-select: none;
}

.spectrum-sat,
.-theme-preserve {
    background-image: linear-gradient(to right, white, rgba(204, 154, 129, 0));
}

.spectrum-val,
.-theme-preserve {
    background-image: linear-gradient(to top, black, rgba(204, 154, 129, 0));
}

.spectrum-hue {
    background: linear-gradient(to left, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}

.spectrum-dragger {
    border-radius: 12px;
    height: 12px;
    width: 12px;
    border: 1px solid white;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    background: black;
    box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.24);
}

.spectrum-slider {
    position: absolute;
    top: -1px;
    cursor: pointer;
    width: 13px;
    height: 13px;
    border-radius: 13px;
    background-color: rgb(248, 248, 248);
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
}

.spectrum-contrast-details {
    position: relative;
    background-color: white;
    width: 100%;
    height: 111px;
    top: 0;
    font-size: 13px;
    color: #333;
    border-top: 1px solid #dadada;
    line-height: initial;
    overflow: hidden;
    flex: none;
}

.spectrum-contrast-details {
    height: 84px;
    flex: none;
}

.spectrum-contrast-details.collapsed {
    height: 42px;
    flex: none;
}

.spectrum-contrast-details div.toolbar.expand {
    position: absolute;
    right: 6px;
    top: 6px;
    margin: 0;
}

.spectrum-contrast-details .toolbar-state-on [is=ui-icon] {
    background-color: rgb(110, 110, 110);
}

.spectrum-contrast-details.visible {
    display: initial;
}

.spectrum-contrast-details div.container {
    margin: 13px 16px;
}

.spectrum-contrast-details.collapsed .expanded-details {
    display: none;
}

.spectrum-contrast-details .expanded-details {
    display: flex;
}

.contrast-pass-fail {
    margin-left: 0.5em;
}

.spectrum-contrast-details .contrast-choose-bg-color,
.spectrum-contrast-details .contrast-thresholds {
    width: 145px;
}

.spectrum-contrast-details .background-color {
    position: absolute;
    flex: none;
    right: 12px;
}

.spectrum-contrast-details .spectrum-eye-dropper {
    top: 2px;
    right: 34px;
    position: absolute;
    left: auto;
}

.contrast-threshold .smallicon-checkmark-square,
.contrast-threshold .smallicon-no{
    display: none;
}

.contrast-threshold.pass .smallicon-checkmark-square {
    display: inline-block;
    background-color: #00b06f;
}

.contrast-threshold.fail .smallicon-no {
    display: inline-block;
    background-color: #b40202;
}

.contrast-threshold-value {
    font-weight: bold;
}

.contrast-link {
    margin-left: 0.5em;
}

.contrast-link .mediumicon-info {
    margin-top: -3px;
    background-color: #333;
}

.spectrum-contrast-details.contrast-fail .contrast-link .mediumicon-info {
    display: none;
}

.contrast-link .mediumicon-warning {
    margin-top: -3px;
    background-color: #C63626;
    display: none;
}

.spectrum-contrast-details.contrast-fail .contrast-link .mediumicon-warning {
    display: inline-block;
}

.contrast-details-value {
    color: #333;
    border: 1px solid #333;
    border-radius: 2px;
    margin-left: 0.5em;
    padding: 1px 3px;
    align-items:  baseline;
    cursor: pointer;
    user-select: text;
    background-color: white;
}

.contrast-details-value [is=ui-icon] {
    display: none;
    margin-left: 0.5em;
    background-color: #333;
}

.spectrum-contrast-details .contrast-details-value.contrast-unknown {
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    width: 3em;
    text-align: center;
}

.contrast-details-value .smallicon-checkmark-behind {
    margin-left: -6px;
}

.spectrum-contrast-details.contrast-fail .contrast-details-value .smallicon-no {
    display: inline-block;
}

.contrast-details-value.contrast-aa .smallicon-checkmark-square {
    display: inline-block;
}

.contrast-details-value.contrast-aaa .smallicon-checkmark-behind {
    display: inline-block;
}

.swatch {
    width: 32px;
    height: 32px;
    margin: 0;
    position: absolute;
    top: 15px;
    left: 44px;
    background-image: url(Images/checker.png);
    border-radius: 16px;
}

.swatch-inner,
.swatch-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    display: inline-block;
    border-radius: 16px;
}

.swatch-inner-white {
    border: 1px solid #ddd;
}

.swatch-overlay {
    cursor: pointer;
    opacity: 0;
    padding: 4px;
}

.swatch-overlay:hover {
    background-color: rgba(0, 0, 0, .3);
    opacity: 1;
}

.swatch-overlay:active {
    background-color: rgba(0, 0, 0, .5);
}

.copy-color-icon {
    background-color: white;
}

.spectrum-text {
    position: absolute;
    top: 60px;
    left: 16px;
}

.spectrum-text-value {
    display: inline-block;
    width: 40px;
    overflow: hidden;
    text-align: center;
    border: 1px solid #dadada;
    border-radius: 2px;
    margin-right: 6px;
    line-height: 20px;
    padding: 0;
    color: #333;
    white-space: nowrap;
}

.spectrum-text-label {
    letter-spacing: 39.5px;
    margin-top: 8px;
    display: block;
    color: #deb7b7;
    margin-left: 16px;
    width: 174px;
}

.spectrum-text-hex > .spectrum-text-value {
    width: 178px;
}

.spectrum-text-hex > .spectrum-text-label {
    letter-spacing: normal;
    margin-left: 0px;
    text-align: center;
}

.spectrum-palette-value {
    background-color: rgb(65, 75, 217);
    border-radius: 2px;
    margin-top: 12px;
    margin-left: 12px;
    width: 12px;
    height: 12px;
    display: inline-block;
}

.spectrum-switcher {
    border-radius: 2px;
    height: 20px;
    width: 20px;
    padding: 2px;
}

:host-context(.-theme-with-dark-background) .spectrum-switcher {
    -webkit-filter: invert(60%);
}

.spectrum-display-switcher {
    top: 72px;
    position: absolute;
    right: 10px;
}

.spectrum-switcher:hover {
    background-color: #EEEEEE;
}

.spectrum-eye-dropper {
    width: 32px;
    height: 24px;
    position: relative;
    left: 8px;
    top: 17px;
    cursor: pointer;
}

.spectrum-palette {
    border-top: 1px solid #dadada;
    position: relative;
    width: 100%;
    padding: 6px 24px 6px 6px;
    display: flex;
    flex-wrap: wrap;
}

.spectrum-palette-colors {
    display: flex;
    flex-wrap: wrap;
    width: 198px;
}

.spectrum-palette-color {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 2px;
    margin: 6px;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-position: -1px !important;
    z-index: 14;
}

.spectrum-palette-color:hover:not(.spectrum-shades-shown) > .spectrum-palette-color-shadow {
    opacity: 0.2;
}

.spectrum-palette-color:hover:not(.spectrum-shades-shown) > .spectrum-palette-color-shadow:first-child {
    opacity: 0.6;
    top: -3px;
    left: 1px;
}

.spectrum-palette-color-shadow {
    position: absolute;
    opacity: 0;
    margin: 0;
    top: -5px;
    left: 3px;
}

.palette-color-shades {
    position: absolute;
    background-color: white;
    height: 228px;
    width: 28px;
    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    z-index: 14;
    border-radius: 2px;
    transform-origin: 0px 228px;
    margin-top: 16px;
    margin-left: -8px;
}

.spectrum-palette-colors > .spectrum-palette-color.spectrum-shades-shown {
    z-index: 15;
}

.palette-color-shades > .spectrum-palette-color {
    margin: 8px 0 0 0;
    margin-left: 8px;
    width: 12px;
}

.spectrum-palette > .spectrum-palette-color {
    transition: transform 100ms cubic-bezier(0, 0, 0.2, 1);
    will-change: transform;
    z-index: 13;
}

.spectrum-palette > .spectrum-palette-color.empty-color {
    border-color: transparent;
}

.spectrum-palette > .spectrum-palette-color:not(.empty-color):not(.has-material-shades):hover,
.palette-color-shades > .spectrum-palette-color:not(.empty-color):hover {
    transform: scale(1.15);
}

.add-color-toolbar {
    margin-left: -3px;
    margin-top: -1px;
}

.spectrum-palette-switcher {
    right: 10px;
    bottom: 9px;
    margin-top: 9px;
    position: absolute;
}

.palette-panel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    z-index: 14;
    transition: transform 200ms cubic-bezier(0, 0, 0.2, 1), visibility 0s 200ms;
    border-top: 1px solid #dadada;
    visibility: hidden;
}

.palette-panel-showing > .palette-panel {
    transform: translateY(calc(-100% + 117px));
    transition-delay: 0s;
    visibility: visible;
}

.palette-panel > div.toolbar {
    position: absolute;
    right: 6px;
    top: 6px;
}

.palette-panel > div:not(.toolbar) {
    flex: 0 0 38px;
    border-bottom: 1px solid #dadada;
    padding: 12px;
    line-height: 14px;
    color: #333;
}

.palette-panel > div.palette-title {
    font-size: 14px;
    line-height: 16px;
    color: #333;
    flex-basis: 40px;
}

div.palette-preview {
    display: flex;
    cursor: pointer;
}

.palette-preview-title {
    flex: 0 0 84px;
}

.palette-preview > .spectrum-palette-color {
    margin-top: 1px;
}

.palette-preview:hover {
    background-color: #eee;
}

.spectrum-overlay {
    z-index: 13;
    visibility: hidden;
    background-color: hsla(0, 0%, 0%, 0.5);
    opacity: 0;
    transition: opacity 100ms cubic-bezier(0, 0, 0.2, 1), visibility 0s 100ms;
}

.palette-panel-showing > .spectrum-overlay {
    transition-delay: 0s;
    visibility: visible;
    opacity: 1;
}

.spectrum-contrast-container {
    width: 100%;
    height: 100%;
}

.spectrum-contrast-line {
    fill: none;
    stroke: white;
    opacity: 0.7;
    stroke-width: 1.5px;
}

.delete-color-toolbar {
    position: absolute;
    right: 0;
    top: 0;
    background-color: #EFEFEF;
    visibility: hidden;
    z-index: 3;
    width: 36px;
    display: flex;
    align-items: center;
    padding-left: 4px;
    bottom: 2px;
    border-bottom-right-radius: 2px;
}

@keyframes showDeleteToolbar {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.delete-color-toolbar.dragging {
    visibility: visible;
    animation: showDeleteToolbar 100ms 150ms cubic-bezier(0, 0, 0.2, 1) backwards;
}

.delete-color-toolbar-active {
    background-color: #ddd;
    color: white;
}

.swatch.contrast {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 0px;
    right: 0;
    left: auto;
    background-image: url(Images/checker.png);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swatch.contrast .swatch-overlay {
    padding: 0;
}

.background-color .text-preview {
    color: black;
    font-size: 16px;
    position: relative;
    padding-bottom: 2px;
}

.swatch.contrast [is=ui-icon] {
    margin: -2px;
}

button.background-color-picker {
    border: 0;
    padding:  0;
    background: none;
    position: relative;
    margin: 0;
}

button.background-color-picker.active [is=ui-icon].largeicon-eyedropper.icon-mask {
    background-color: hsl(218, 81%, 59%);
}

button.background-color-picker:hover [is=ui-icon].largeicon-eyedropper.icon-mask {
    background-color: #333;
}
