
div#certificate-builder {
    display: inline-block;
}

.pdf_builder{position:relative;    display: grid;
    grid-template-columns: 1fr 200px;
}

.pdf_elements {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(80px,120px));
    grid-gap: 10px;
    align-items:center;
        grid-column: 1/-1;  
}

.pdf_element {
    text-align: center;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 0px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

div#certificate-builder .inside {
    background: #fafafa;
    margin: 0;
    padding: 10px;
}

.pdf_element:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pdf_builder_main {
    border: 2px dotted rgba(0,0,0,0.1);
    margin: 10px 0 0;
}



.popup_element_wrapper {
    background: #fafafa;
    position:relative;
}


.popup_element {
    padding: 15px;
    border-radius: 5px;
    width: 180px;
    position:relative;
    height: calc(100% - 30px);
}
.popup_element img{width: 100%;}
.popup_element .controls{
    display: grid;
    grid-gap: 10px;
    margin: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100% - 150px);
}

.popup_element a.button-primary {
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 180px;
}

.popup_element a.button{
    text-align: center;
    position: absolute;
    bottom: 36px;
    width: 180px;
}

.popup_element textarea {
    width: 100%;
    height: 100%;
}
.save_element{
    grid-column:-1;
}
.restore_element{
    grid-column: -2;
    grid-row: 1;
}
.popup_element .right_block{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 5px;
}

.popup_element .close_element{
    position: absolute;
    top: -10px;
    right: -10px;
    color: white;
    background: red;
    border-radius: 15px;
}
.inline_image_element{overflow:hidden;}
.inline_image_element > img{
    width:100%;
}

.pdf_builder_main{
    position: relative;
}
.controls ul li > label{
    display: block;
}
.inline_text_element.active,.inline_image_element.active,
.inline_text_element:hover,.inline_image_element:hover{
    box-shadow:0 0 2px rgba(0,133,186,0.8);
}
.inline_text_element,.inline_image_element{
    cursor:move;word-break: break-all;
}

.ui-slider-horizontal{    border: 2px solid #eee;
    border: 2px solid #eee;
    position: relative;
    display: block;
    margin: 5px 0 15px;
    border-radius: 2px;
    margin-right: 60px;
    width: 120px;
}
.right_block > div{
    grid-column:1/-1;
    width: 178px;
}
.right_block> input{width:100%;}
.ui-slider-horizontal .ui-slider-handle {
    border-radius: 50%;
    margin-top: 0;
    width: 10px;
    height: 10px;
    margin-left: 0px;
    background: rgb(129, 210, 96);
    border: none;
}
.upload_image{
    padding: 8px 15px;
    background: #0085ba;
    display: block;
    text-align: center;
    color: #fff;
    margin-bottom: 10px;
    border-radius: 5px;
}
li > .slider_input{margin-top: -5px !important;}
.slider_input{    width: 45px;
    float: right;
    margin: 12px 4px 0 0;}

    .controls .select{width:178px;}