/* table.tpl */

html, body{
    min-height: 100%;
}

.body {
    perspective: 800px;
}

.table-page {
    padding: 10px 0;
}

.table-page>h1 {
    margin: 20px 0;
}

.selected-block {
    display: grid;
    width: 100%;
    grid-template-columns: 100px 1fr 1fr 100px;
    place-items: center;
}

.table-page>.selected-block {
    border-bottom: 5px groove #31b0d5;
    border-radius: 10px;
}

.selected-block>.print-button {
    place-self: center;
}

.selected-options {
    display: grid;
    grid-auto-flow: column;
    grid-template-areas: "selected-option-img selected-option-header" "selected-option-img selected-option-span";
}

.selected-options>h4 {
    grid-area: selected-option-header;
    place-self: end start;
}

.selected-options>span {
    grid-area: selected-option-span;
    place-self: start;
}

.selected-options>img {
    grid-area: selected-option-img;
    place-self: center;
}

.container>h1 {
    text-align: center;
}

.notice-calc>* {
    color: red;
    text-align: center;
}

.form-check-input[type="radio"] {
    display: none;
}

input[type="radio"]+span,
input[type="checkbox"] {
    cursor: pointer;
}

.form-check-input:checked+span {
    border-bottom: 4px ridge #31b0d5;
    border-radius: 4px;
}

.form-check-input:hover+span {
    text-decoration: underline solid black;
}

th {
    text-align: center;
    border-bottom: unset;
}

thead>tr:last-child {
    border-bottom: 2px solid #ddd;
}

.js-waiting {
    display: grid;
    place-content: center;
    position: relative;
}

.js-waiting span {
    font-size: 1.25em;
    color: white;
    filter: drop-shadow(1px 0px 0px #269abc) drop-shadow(-1px 0px 0px #269abc) drop-shadow(0px 1px 0px #269abc) drop-shadow(0px -1px 0px #269abc);
}

.progress-horizontal {
    display: block;
    position: absolute;
    width: 100%;
    height: 2.2em;
    margin: 0;
    background-color: transparent;
    overflow: hidden;
    border-radius: 50%;
    z-index: -1;
    top: -0.3em;
}

.bar-horizontal {
    position: absolute;
    height: 100%;
    background-color: transparent;
    background-image: linear-gradient(to right, white 0%, white 15%, #269abc 50%, white 85%, white 100%);
    animation-name: spinner;
    animation-duration: 2500ms;
    animation-timing-function: cubic-bezier(.5, .0, .5, 1);
    animation-play-state: running;
    animation-direction: alternate;
    animation-iteration-count: infinite;
    border-top: 5px solid #269abc;
    border-bottom: 5px solid #269abc;
}

@keyframes spinner {
    0% {
        left: 0;
        right: 100%;
    }
    50% {
        left: 0;
        right: 0;
    }
    100% {
        left: 100%;
        right: 0;
    }
}

@keyframes animFailedinput {
    0% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.50) 0%, transparent 10%);
    }
    10% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.55) 0%, transparent 15%);
    }
    20% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.60) 0%, transparent 20%);
    }
    30% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.65) 0%, transparent 25%);
    }
    40% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.70) 0%, transparent 30%);
    }
    50% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.75) 0%, transparent 35%);
    }
    60% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.70) 0%, transparent 30%);
    }
    70% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.65) 0%, transparent 25%);
    }
    80% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.60) 0%, transparent 20%);
    }
    90% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.55) 0%, transparent 15%);
    }
    100% {
        background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.50) 0%, transparent 10%);
    }
}

.js-result-str {
    border-top: 5px groove #31b0d5;
    border-bottom: 5px groove #31b0d5;
    border-radius: 10px;
    margin: 20px 0;
    padding: 10px 0;
}

.raskr {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.raskr>li {
    flex: 1 1 49%;
    padding: 10px 10px;
}

.js-result-prices {
    margin: 20px 0;
    width: 100%;
}

.js-result-prices>p>span {
    font-weight: 700;
}

.js-btn-add-row {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.js-remove-row {
    cursor: grabbing;
}

.cut-stats {
    display: flex;
}

.cut-stats>div {
    margin: 0 10px 10px;
}

.modal-bk {
    position: fixed;
    background-color: rgba(200, 200, 200, 0.5);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: +1000;
    overflow-y: hidden;
}

.modal-bk>div {
    position: relative;
    top: 50%;
    left: 55%;
    width: 225px;
    min-height: 8em;
    display: grid;
    grid-template-rows: 4fr auto;
    grid-auto-flow: row;
    padding: 5px;
    grid-gap: 5px;
    border: 5px groove #31b0d5;
    border-right: none;
    border-left: none;
    border-radius: 10px;
    background-color: white;
}

.modal-bk textarea {
    width: 210px;
    height: 6em;
    resize: none;
    border-radius: 5px;
}

.request-totals {
    --border-color: lightgray;
    display: flex;
    flex-direction: column;
    margin: 1em 0;
    min-width: 100%;
}

.request-totals h4 {
    padding-left: 2em;
}

.request-totals>div {
    padding: 0.25em 0.5em;
    min-height: 2em;
}

#edges-table>*,
#works-table>* {
    border: 1px solid #ddd;
    padding: 0.5ch 1ch;
}

#edges-table {
    display: grid;
    grid-template-columns: 5ch 10fr 12fr 12fr 12fr;
}

#works-table {
    display: grid;
    grid-template-columns: 5ch 42fr 12fr 12fr 12fr;
}

#totals {
    font-weight: 700;
    font-size: 1.25em;
    padding-left: 4rem;
    display: flex;
    gap: 2ch;
}

.rt-service-name {
    grid-column: 1 / span 2;
}

.rt-edge-service-total-price-sum {
    font-weight: 700;
}

.js-subsum {
    display: inline-block;
    min-width: 100%;
}

.form-check input[type="checkbox"] {
    margin: 0px;
    position: relative;
    display: block !important;
    appearance: none;
    min-width: 2em;
}

.form-check input[type="checkbox"]:focus,
.form-check input[type="checkbox"]:focus-visible {
    outline: none;
}

.form-check input[type="checkbox"]:before {
    position: relative;
    content: '';
    font-size: 1em;
    display: inline-block;
    border-width: 2px 2px 2px 2px;
    border-color: gray;
    border-style: solid;
    width: 2em;
    height: 2em;
    transform: rotateZ(0deg);
    transition: all 0.25s linear;
}

.form-check input[type="checkbox"]:checked:before {
    content: '';
    width: 1em;
    border-color: #31b0d5;
    border-width: 0 3px 3px 0;
    transform: rotateZ(45deg) translate(25%, -25%);
}

.formcheckFailed {
    background-color: rgba(255, 0, 0, 0.125);
    background-image: linear-gradient(0deg, rgba(255, 0, 0, 0.5) 0%, transparent 10%);
}

.formcheckApproved {
    background-image: linear-gradient(0deg, green 0%, transparent 10%);
}

.formFailedInputAnimation {
    animation-name: animFailedinput;
    animation-duration: 0.2s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}


/* select.tpl */

.selected-block,
.selector-block {
    min-height: 300px;
}

.selector-block {
    display: grid;
    grid-gap: 5px;
}

.selector-block>div {
    display: grid;
    grid-template-areas: "sbd-label sbd-btn1 sbd-div" "sbd-select sbd-select sbd-div" "sbd-btn2 sbd-btn2 sbd-div";
    grid-gap: 1em;
    grid-template-columns: 300px 100px auto;
    grid-template-rows: 1fr 1fr 1fr;
}

.selector-block>div>label {
    grid-area: sbd-label;
    place-self: stretch;
}

.selector-block>div>button:first-of-type {
    grid-area: sbd-btn1;
    place-self: start;
    margin-top: 1.4em;
}

.selector-block>div>button:last-of-type {
    grid-area: sbd-btn2;
    place-self: center;
}

.selector-block>div>select {
    grid-area: sbd-select;
    place-self: center;
    width: 100%;
}

.selector-block>div>div {
    grid-area: sbd-div;
    display: grid;
    grid-template-areas: "sbdd-img sbdd-h4" "sbdd-img sbdd-span";
    grid-template-columns: 220px auto;
}

.selector-block>div>div>h4 {
    grid-area: sbdd-h4;
    place-self: end start;
}

.selector-block>div>div>img {
    grid-area: sbdd-img;
}

.selector-block>div>div>span {
    grid-area: sbdd-span;
    place-self: start;
}

.img-preview {
    border: 1px solid #ddd;
    margin: 5px 10px;
    max-width: 200px;
    height: auto;
}

.js-sel-mat,
.js-sel-edge,
.js-selected-mat,
.js-selected-edge {
    margin: 20px 0;
    padding: 0 20px;
    border-radius: 5px;
    border-right: 4px groove #31b0d5;
    border-left: 4px groove #31b0d5;
}

.js-sel-mat,
.js-sel-edge {
    border-color: yellow;
}

.js-sel-mat>h1,
.js-sel-edge>h1 {
    font-size: 1.5em;
}

.js-selected-mat,
.js-selected-edge {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 230px auto 85px;
    place-items: center start;
    border-color: #31b0d5;
}

#add-edge {
    margin-right: 2em;
    appearance: none;
    position: relative;
    top: -0.875em;
}

#add-edge:before {
    position: absolute;
    content: '';
    display: inline-block;
    border-width: 3px 3px 3px 3px;
    border-color: red;
    border-style: solid;
    width: 1em;
    height: 1em;
    transform: rotateZ(0deg);
    transition: all 0.25s linear;
}

#add-edge:checked:before {
    width: 0.5em;
    border-color: #31b0d5;
    border-width: 0 3px 3px 0;
    transform: rotateZ(45deg) translate(50%, -50%);
}

#add-edge+label {
    cursor: pointer;
}

#add-edge:not(:checked)+label {
    color: lightgray;
}

select {
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    background-image: none;
    border: 1px solid #46b8da;
    padding: 6px 25px 6px 12px;
    font-size: 14px;
    height: 2.4em;
    border-radius: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin-bottom: 2px;
    appearance: none;
    background-image: url(/images/angle-double-down-solid.svg);
    background-repeat: no-repeat;
    background-position: right;
    background-size: 1em;
    background-position-x: 95%;
}

select::-ms-expand {
    display: none;
}

select:focus {
    border-color: black;
    box-shadow: 0 0 0px 2px rgba(100, 100, 100, 0.3), 0 0 1px 3px yellow;
}

.select-page .js-continue {
    width: 100%;
    height: 5rem;
}

.js-form-hidden {
    display: none;
}

.hover-anno {
    font-size: 1.5em;
    cursor: help;
    position: relative;
}

.hover-anno:after {
    content: attr(data-content);
    display: block;
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    width: 0px;
    height: 0px;
    transition-duration: 0.25s;
    transition-property: all;
    transition-timing-function: linear;
    opacity: 0;
    box-sizing: content-box;
    background-color: rgba(200, 200, 200, 0.75);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: contain;
}

.hover-anno:hover:after {
    opacity: 1;
    border-width: 5px;
    border-style: groove;
    border-color: #31b0d5;
    box-shadow: 0px 0px 10px 1px #31b0d5, 15px 15px 25px 5px gray, -10px 10px 50px lightgray;
    border-radius: 10px;
    z-index: +1;
}

.anno-material:hover:after {
    background-image: url(/images/material-help.jpg);
    width: 600px;
    height: 400px;
}

.anno-edge:hover:after {
    background-image: url(/images/edge-help.jpg);
    width: 600px;
    height: 400px;
}


/*message*/

.message-sent {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(100, 100, 100, 0.3);
    z-index: 1000;
    display: flex;
}

.message-set__container {
    display: grid;
    margin: auto;
    grid-auto-flow: row;
    background: rgba(50, 50, 50, 0.9);
    box-shadow: 0 0 15px black;
    text-align: center;
    border-radius: 5px;
    padding: 2em 3em;
}

.message-set__container h3 {
    color: white;
}

.message-set__container button {
    border: none;
    border-radius: 50px;
    font-size: 1.5em;
    text-align: center;
    margin: 1em;
    padding: 0.5em 0.75em;
}

.js-inp-edge {
    min-width: 40px;
}


/* Basket button */

.basket-button {
    background-image: url(/images/shopping-cart.svg);
    background-color: transparent;
    position: relative;
    padding: 0;
    border: 0;
    border: none;
    width: 70px;
    height: 70px;
    margin: 15px;
}

.basket-button .badge {
    bottom: 0;
    right: 0;
    position: absolute;
    background-color: #d00000;
    z-index: +102;
}

.input-compact {
    padding: 1px;
    text-align: center;
}

.orders-table {
    text-align: center;
}


/* The Modal Window */

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    padding-top: 100px;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}


/* The Close Button */

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


/* Modal Header */

.modal-header {
    padding: 2px 16px;
}


/* Modal Body */

.modal-body {
    padding: 20px;
}


/* Modal Content */

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    border: 1px solid #888;
    width: 80%;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.4s
}


/* Add Animation */

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0
    }
    to {
        top: 0;
        opacity: 1
    }
}

/* Basket modal */

#basketModal{
    z-index: +105;
}

#basketModal table{
    height:100%;
}

#basketModal p{
    margin:0;
}
.modal-table-grid{
    display:grid;
    grid-auto-flow: row;
    height:100%;
}

.modal-table-grid div+div{
    margin: 1ch 0;
    padding-top: 1ch;
    border-top:1px dotted #aaa9;
}

/* Add to basket "animation" */

#basketAdd{
    position: absolute;
    transition: all 500ms ease-in-out;
    background-color: #d0000099;
    color: #fefefe;
    display: grid;
    place-items: center;
    z-index: +101;
    border-radius: 5px;
}

#basketAdd svg{
    max-height: 100%;
    max-width: 100%;
    height: auto;
    width: auto;
}