* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    background-color: #fafafa;
    font-size: 16px;
    line-height: 1.15;
    color: #252525;
    font-family: Tahoma, Arial, sans-serif;
    padding-bottom: 60px;
}

body.popup-opened {
    overflow: hidden;
}

.content {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    -webkit-box-shadow: 0 0.1em 0.35em 0 rgba(179, 177, 177, .18);
    box-shadow: 0 0.2em 1em 0.05em rgba(179, 177, 177, .2)
}

.preview-img-wrap {
    padding: 1.6em 0;
}

.preview-img {
    position: relative;
}

.preview-img img,
.preview-img svg {
    display: block;
}

.svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.preview-img img {
    max-width: 100%;
    height: auto;
}

.color-search-wrap {
    display: flex;
    width: 100%;
    padding: 1em 2.6em;
    border-top: 1px solid #e3e3e3;
    background-color: #fff;
}

.set-color {
    display: table-cell;
}

.all-colors {
    display: table-cell;
    text-align: right;
    margin-left: auto;
}

#all-colors-btn {
    font-size: 1em;
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.2;
    padding: .75em 2.2em;
    -webkit-transition: all .3s ease;
    -o-transition: all .3s ease;
    transition: all .3s ease;
    text-align: center;
    color: #fff;
    border: 1px solid transparent;
    outline: none;
    background: #000000;
    white-space: pre;
    margin-left: 15px;
}

#all-colors-btn:hover {
    color: #666666;
    cursor: pointer;
}

.set-color label {
    font-size: 16px;
}

#color-input {
    width: 8em;
    padding: .7em;
    font-size: 16px;
    border: 1px solid #e3e3e3;
    outline: none;
    line-height: 1.15;
    margin: 0 0 0 4px;
}

#color-input.error {
    border-color: #b02121;
     -webkit-box-shadow: 0 0 3px 0 rgba(176, 33, 33, .34);
     box-shadow: 0 0 3px 0 rgba(176, 33, 33, .34);
}

.palette-grid {
    background-color: #fafafa;
    padding: 1em 2.6em;
    border-top: 1px solid #e3e3e3;
}

.palette-grid .title {
    font-size: 16px;
    margin: 0 0 15px 0;
}

.color-block {
    width: 11%;
    cursor: pointer;
    display: inline-block;
    border: 1px solid #fff;
    vertical-align: top;
    margin: 0 0.75% 2%;
    -webkit-transition: all .1s linear;
    -o-transition: all .1s linear;
    transition: all .1s linear;
}

.color-block .color {
    width: 100%;
    height: 50px;
}

.color-block .label {
    margin: 3px 0 0 0;
    border: 1px solid #e3e3e3;
    padding: .2em;
    font-size: 14px;
    color: #525252;
    text-align: center;
}

.color-block:hover {
    -webkit-box-shadow: 0 0 0.35em 0;
    box-shadow: 0 0 0.35em 0;
}

.color-block:hover .label {
    border: 0;
    border-top: 1px solid #fff;
    background-color: #ed5562;
    color: #fff;
    margin: 0;
}

.color-block:hover .color {
    height: 53px;
}

.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1400;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    padding: 40px;
    width: 980px;
    max-width: 94%;
    background: #fff;
    margin: 30px auto;
}

.modal .title {
    font-size: 22px;
    margin: 0 0 15px 0;
    font-weight: bold;
    text-transform: uppercase;
}

.close {
    position: absolute;
    right: 26px;
    top: 26px;
    width: 26px;
    height: 26px;
    opacity: 0.3;
}
.close:hover {
    opacity: 1;
}
.close:before, .close:after {
    position: absolute;
    left: 15px;
    content: ' ';
    height: 24px;
    width: 2px;
    background-color: #333;
}
.close:before {
    transform: rotate(45deg);
}
.close:after {
    transform: rotate(-45deg);
}

.svg-layer svg path {
    pointer-events:all;
}

.svg-layer .change-color.hover,
.svg-layer .change-color.active {
    fill: #fff!important;
    cursor: pointer;
    -webkit-transition: fill 0.2s ease;
    -o-transition: fill 0.2s ease;
    transition: fill 0.2s ease;
}

.shadow-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.84;
    pointer-events: none;
}

.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.color-labels-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.color-labels-layer div {
    display: none;
    position: absolute;
    color: #000;
    font-size: 0.7em;
    padding: 0.2em 0.5em;
    background: rgba(255, 255, 255, 0.8);
}

.btns-wrap {
    padding: 1em 2.6em;
    border-top: 1px solid #e3e3e3;
    background-color: #fff;
}

#print svg,
#save svg {
    display: block;
    width: 2em;
}

#print,
#save {
    line-height: 1;
    display: inline-block;
    padding: .5em;
    opacity: 0.5;
    color: rgb(37, 37, 37);
    border: 1px solid rgb(37, 37, 37);
}

#print:hover,
#save:hover{
    opacity: 0.75;
}

@media only screen and (max-width: 760px) {
    .color-block {
        width: 16%;
        margin: 0 0.33333% 2%;
    }
}

@media only screen and (max-width: 600px) {
    .color-block {
        width: 24%;
        margin: 0 0.5% 2%;
    }

    .color-search-wrap,
    .palette-grid {
        padding: 1em 1.6em;
    }

    .modal-content {
        padding: 30px;
    }
}

@media only screen and (max-width: 540px) {
    .color-search-wrap {
        display: block;
    }

    .set-color {
        display: block;
    }

    .all-colors {
        display: block;
        text-align: left;
    }

    #color-input {
        margin: 4px 0 0 0;
        width: 100%;
    }

    #all-colors-btn {
        width: 100%;
        margin: 15px 0 0 0;
    }
}

@media only screen and (max-width: 460px) {
    .color-labels-layer div {
        font-size: 0.6em;
    }
}

@media only screen and (max-width: 400px) {
    .color-block {
        width: 32%;
        margin: 0 0.666666% 2%;
    }

    .color-search-wrap,
    .palette-grid {
        padding: 1em 1.2em;
    }

    .modal-content {
        padding: 25px;
    }
}

@media only screen and (max-width: 380px) {
    .color-labels-layer div {
        font-size: 0.5em;
    }
}

@media print {
    #all-colors-btn {
        display: none;
    }

    .content {
        box-shadow: none;
    }

    .palette-wrap {
        display: none;
    }

    .btns-wrap {
        display: none;
    }
}


/**/


.find-color{
    position: relative;
    width: 100%;
}

#color-list{
    position: absolute;
    display: none;
    top: 45px;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    padding: 15px 0 15px 15px;
    flex-wrap: wrap;
    grid-gap: 7px;
    box-shadow: 0px 0px 8px 1px #0000007a;

}


#color-list.active{
    display: flex;
}

.search-color-item{
    display: flex;
    max-width: calc(20% - 7px);
    width: 100%;
    flex-direction: column;
    border: 1px solid #e3e3e3;
    cursor: pointer;
}

.search-color-item .bg-color{
    width: 100%;
    height: 45px;
}

.search-color-name{
    margin-top: 5px;
    text-align: center;
}

#find-color-input{
    width: 8em;
    padding: .7em;
    font-size: 16px;
    border: 1px solid #e3e3e3;
    outline: none;
    line-height: 1.15;
    margin: 0 0 0 4px;
}


@media only screen and (max-width: 760px) {
    .search-color-item{
        max-width: calc(25% - 7px);
    }
}

@media only screen and (max-width: 400px) {
    .search-color-item{
        max-width: calc(33% - 7px);
    }
}