.calculator_flooring {
    margin-top: 3rem;

    .toolbar {
        border: 1px solid #e8e8e8;
        margin: 30px 0;
        padding: 20px;

        background: white;
        display: flex;
        gap: 25px 10px;
        align-items: flex-end;
        flex-wrap: wrap;
        z-index: 10;
        flex-shrink: 0;
        border-left: 2px solid #1f1f1f;

        @media (max-width: 768px) {
            gap: 15px;
            border-left: 1px solid #e8e8e8;
        }
    }

    .plintus--wrapper {
        border: 1px solid #e8e8e8;
        margin: 30px 0;
        border-left: 2px solid #1f1f1f;
        padding: 20px;

        @media (max-width: 768px) {
            border-left: 1px solid #e8e8e8;
        }
    }

    #openModalProducts {
        padding: 0 20px;

        @media (max-width: 768px) {
            width: 100%;
            height: 45px;
        }
    }

    .input-block {
        display: flex;
        flex-direction: column;
        font-size: 14px;
        text-align: left;

        @media (max-width: 768px) {
            width: 100%;
        }
    }

    .input-block label {
        color: #666;
        margin-bottom: 3px;
        line-height: 1.4;
    }

    .stats-panel .btn-add-to-cart-calc {
        width: 200px;
        margin: 40px 0 30px auto;
    }

    .input-block input, .input-block select {
        padding: 1px 6px;
        height: 40px;
        min-width: 143px;
        max-width: 150px;
        border: 1px solid #ccc;
        background: #fff;
        color: #5b5b5b;

        @media (max-width: 768px) {
            width: 100%;
            max-width: none;
        }
    }

    .toolbar-start-settings {
        width: 100%;
        display: flex;
        gap: 10px;
        align-items: flex-start;
        flex-direction: column;
        border: 1px solid #e8e8e8;
        margin: 30px 0;
        padding: 20px 20px 40px;

        @media (max-width: 768px) {
            flex-direction: column;
        }
    }

    .toolbar-start-settings select {
        min-width: 150px;
    }

    .product-selected {
        font-size: 14px;
        display: block;
        line-height: 1.7;
        padding: 15px 5px;

        @media (max-width: 768px) {
            width: 100%;
            margin-bottom: 20px;
            padding: 15px 0;
        }
    }

    .btn-group {
        margin-left: auto;
        display: flex;
        align-items: flex-end;
        gap: 30px;

        @media (max-width: 768px) {
            justify-content: space-between;
            width: 100%;
            margin-top: 10px;
            gap: initial;
        }
    }

    .btn-group-settings {
        display: flex;
        align-items: flex-end;
        gap: 10px;
    }

    .btn-group-auto {
        @media (max-width: 768px) {
            margin-right: auto;
        }
    }

    .btn-group svg {
        width: 18px;
        height: 24px;
        position: relative;
        vertical-align: middle;
    }

    button {
        border: none;
        cursor: pointer;
        font-weight: bold;
        transition: 0.2s;
        font-size: 14px;
        height: 47px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 47px;
    }

    .btn-primary {
        background: #232323;
        color: white;
    }

    .btn-secondary {
        border: 1px solid #ccc;
        background: #fff;
        color: #5b5b5b;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-danger {
        background: #1f1f1f;
        color: white;
    }

    .btn-danger.active {
        outline: 2px solid #fff;
        outline-offset: -4px;
    }

    .btn-danger:active {
        outline: 2px solid #fff;
        outline-offset: -4px;
    }

    button:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

    #work-area {
        position: relative;
        overflow: hidden;
        background: #fff;
        cursor: crosshair;
        min-height: 500px;
        min-width: 500px;
        max-width: 1500px;
        touch-action: none;

        @media (max-width: 768px) {
            margin: 0 10px;
        }
    }

    #work-area.mode-view {
        cursor: grab;
    }

    #work-area.mode-view:active {
        cursor: grabbing;
    }

    #svgArea {
        touch-action: none;
    }

    canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    svg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .wall {
        stroke: #c61212;
        stroke-width: 1px;
        stroke-linecap: round;
    }

    .corner-node {
        fill: transparent;
        stroke: #3e2323;
        stroke-width: 1px;
        r: 5;
        cursor: grab;
        pointer-events: all;
    }

    .corner-node:active {
        cursor: grabbing;
    }

    .wall-label {
        font-size: 14px;
        fill: #000000;
        font-weight: bold;
        paint-order: stroke;
        stroke: white;
        stroke-width: 3px;
        text-anchor: middle;
    }

    .preview-line {
        stroke: #a57f5e;
        stroke-width: 2;
        stroke-dasharray: 5, 5;
        pointer-events: none;
    }

    .plank {
        stroke: #000000f2;
        stroke-width: .5px;
    }

    .center-marker {
        stroke: #ff0000;
        stroke-width: 2px;
        fill: none;
        opacity: .6;
        pointer-events: none;
        stroke-dasharray: 1, 1;
    }

    .stats-panel {
        padding: 20px;
        border: 1px solid #e8e8e8;
        border-left: 2px solid #1f1f1f;
        margin-top: 25px;

        @media (max-width: 768px) {
            border-left: 1px solid #e8e8e8;
        }
    }

    .stats-panel--wrapper {
        display: flex;
        justify-content: space-around;
        align-items: baseline;
        flex-shrink: 0;
        opacity: 0.5;
        transition: 0.3s;
        gap: 30px;

        @media (max-width: 768px) {
            width: 100%;
            gap: 15px;
            flex-direction: column;
        }
    }

    .stat-item {
        text-align: center;

        @media (max-width: 768px) {
            display: flex;
            flex-direction: row;
            align-items: baseline;
            width: 100%;
            justify-content: space-between;
            flex-wrap: wrap;
        }
    }

    .stat-label {
        color: #171717;
        margin-bottom: 4px;
        letter-spacing: 0.3px;
        font-size: 14px;
        text-transform: uppercase;
        border-bottom: 1px solid #e3e3e3;
        width: max-content;
    }

    .stat-value {
        font-size: 16px;
        font-weight: 600;
        color: #191919;
    }

    .stat-sub {
        font-size: 14px;
        color: #666;
        margin-top: 2px;

        @media (max-width: 768px) {
            width: 100%;
            text-align: left;
        }
    }

    .waste-warning {
        color: #737373;
    }

    .flex-block {
        display: flex;
        align-items: flex-end;
        gap: 10px;
    }

    #work-area {
        min-height: 500px;
    }

    .clickable-text {
        pointer-events: all;
        cursor: pointer;
    }

    .clickable-text:hover {
        fill: #33a3e3;
    }

    #wallsGroup .clickable-text:last-of-type:hover {
        fill: red;
        cursor: default;
    }

    #valTotal {
        font-size: 24px;
        font-weight: 800
    }

    .modal-calc {
        pointer-events: none;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    }

    .modal-calc.active {
        max-height: 620px;
        opacity: 1;
        pointer-events: auto;
    }

    .modal-content-calc {
        background: white;
        padding: 20px;
        width: 300px;
        text-align: center;
    }

    .modal-buttons {
        display: flex;
        justify-content: space-between;
    }

    .modal-buttons .btn {
        padding: 1px 15px;
        cursor: pointer;
        background-color: #0f0f0f;
        color: white;
        border: none;
    }

    #product {
        position: relative;
        max-width: 100%;
        z-index: 9;
        background: white;
        visibility: visible;
        padding: 30px 5px;
        width: 100%;

        @media (max-width: 768px) {
            padding: 30px 0;
        }
    }

    #product.show {
        visibility: visible;
    }

    .product-info-wrap label {
        line-height: 1.4;
        color: #464646;
        font-size: 14px;
        padding: 7px 0;
    }

    #closeModalProducts {
        top: 10px;
        right: 10px;
        position: absolute;
        color: #8b8b8b;
        font-size: 32px;
        float: right;
        cursor: pointer;

        @media (max-width: 768px) {
            top: -5px;
            right: -5px;
        }
    }

    .product img {
        width: 100%;
        object-fit: cover;
        aspect-ratio: 1 / 1;
    }

    .products-wrapper {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        max-height: 400px;
        padding: 2px;
        gap: 10px;
        justify-content: flex-start;
        overflow-y: scroll;

        @media (max-width: 768px) {
            max-height: 320px;
        }
    }

    .product-price {
        font-size: 16px;
        font-weight: 600;
        padding: 5px;
        width: 100%;
        display: block;
        margin: 7px auto;
        text-align: center;
    }

    .product {
        cursor: pointer;
        max-width: 215px;
        border: 1px solid #cccccc;
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;

        transition: transform .3s;

        @media (max-width: 768px) {
            max-width: 48%;
        }
    }

    .product:hover {
        outline: 2px solid #292929;
    }

    .product:active {
        transform: scale(.95);
        outline: 2px solid #292929;
    }

    .product-info-wrap > a {
        border: 1px solid #cccccc;
        margin: 0;
        padding: 4px 7px;
        font-size: 14px;
        width: 100%;
        display: block;
        text-align: center;

        @media (max-width: 768px) {
            font-size: 11px;
        }
    }

    .product.selected {
        cursor: pointer;
        outline: 2px solid #292929;
    }

    #searchInput {
        width: 100%;
        padding: 10px;
        margin: 25px 0;
        border: 1px solid #ccc;
        box-sizing: border-box;
        font-size: 14px;
    }

    #no-results {
        font-size: 14px;
        text-align: center;
        width: 100%;
        margin: 15px 0;
    }

    .filter-block {
        background: #f9f9f9;
        padding: 10px;
        width: max-content;
        border: 1px solid #e8e8e8;

        @media (max-width: 768px) {
            width: auto;
            flex-direction: column;
            gap: 5px;
        }
    }

    .filter-block .input-block {
        @media (max-width: 768px) {
            width: 100%;
            flex-direction: row;
            justify-content: space-between;
            gap: 20px;
        }
    }

    .filter-block select {
        max-width: max-content;
    }

    .total-amount {
        display: flex;
        justify-content: space-between;
        margin-top: 20px;
        color: #9f9f9f;
        margin-bottom: 4px;
        letter-spacing: 0.3px;
        font-size: 14px;
        width: 100%;
        background: #f2f2f2;
        padding: 20px;

        @media (max-width: 768px) {
            flex-direction: column;
            align-items: center;
        }
    }

    .check .btn.btn-default.in_cart {
        @media (max-width: 768px) {
            width: 100%;
        }
    }

    .settigs-readonly {
        @media (max-width: 768px) {
            flex-wrap: wrap;
            align-items: flex-end;
            justify-content: space-between;
        }
    }

    .settigs-readonly .input-block {
        @media (max-width: 768px) {
            width: 48%;
        }
    }

    #instruction {
        width: max-content;
        padding: 10px;
        font-size: 14px;
        margin-top: 2px;
    }

    #instruction svg {
        width: 22px;
        height: 22px;
        display: block;
        position: relative;
    }

    @keyframes fade-out {
        from {
            opacity: 1;
        }
        to {
            opacity: 0;
        }
    }

    .instruction-exit {
        animation: fade-out 0.8s ease forwards;
    }

    .product-selected--wrapper {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 0 5px;
    }

    .product-selected--wrapper > a {
        display: flex;
        gap: 10px;
        align-items: center;
        border: 1px solid #e8e8e8;
        padding: 15px 25px 15px 15px;
        background: #f9f9f9;
    }

    .product-selected--wrapper > a img {
        width: 60px;
        height: 60px;
        object-fit: cover;
    }

    .product-selected--info {
        display: flex;
        flex-direction: column
    }

    .plintus-bloc {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        padding: 10px 5px 10px 5px;
        margin: 25px 0;
        max-height: 400px;
        overflow: auto;
        justify-content: flex-start;
    }

    .plintus-container {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transition: max-height 0.4s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
    }

    .plintus-container.active {
        max-height: 525px;
        opacity: 1;
        transform: translateY(0);
    }

    .checkbox-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 700;
    }

    .checkbox-wrapper input {
        display: none;
    }

    .checkbox-custom {
        width: 18px;
        height: 18px;
        border: 2px solid #444;
        position: relative;
        transition: 0.2s;
    }

    .checkbox-wrapper input:checked + .checkbox-custom {
        background: #333;
        border-color: #333;
    }

    .checkbox-wrapper input:checked + .checkbox-custom::after {
        content: "";
        position: absolute;
        left: 4px;
        top: 1px;
        width: 5px;
        height: 10px;
        border: 2px solid white;
        border-top: 0;
        border-left: 0;
        transform: rotate(45deg);
    }

    .check {
        margin-top: 50px;
        border-top: 2px dashed #ddd;
        padding-top: 15px;
    }

    .check-item {
        display: grid;
        grid-template-columns: 60px 1fr auto;
        gap: 12px;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid #f2f2f2;
    }

    .check-img {
        width: 60px;
        height: 60px;
        object-fit: cover;
    }

    .check-info {
        display: flex;
        flex-direction: column;
    }

    .check-title {
        font-weight: 600;
        color: #222;
        text-decoration: none;
    }

    .check-title:hover {
        text-decoration: underline;
    }

    .check-meta {
        font-size: 14px;
        color: #777;
    }

    .check-price {
        font-weight: 700;
        font-size: 15px;
    }

    .check-total {
        display: flex;
        justify-content: space-between;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 2px solid #eee;
        font-size: 18px;
        font-weight: 700;
    }

    .total-amount .stat-label {
        font-weight: 700;
        border-bottom: none;
        margin: 0;
    }

    .valTotal_info {
        font-size: 16px;
        font-weight: 400;
        color: #8b8b8b;
    }

    .type-flooring-installation {
        position: relative;
        padding: 0 5px;
        font-size: 14px;
        line-height: 2;

        @media (max-width: 768px) {
            padding: 0;
        }
    }

    .notification {
        width: 300px;
        position: absolute;
        top: 0;
        right: 0;
        background-color: #ffffff;
        color: #333;
        border: 1px solid #cccccc;
        padding: 12px 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 999;
        transform: translate(110%, 10%);
        font-size: 12px;
        line-height: 1.7;

        @media (max-width: 768px) {
            left: 0;
            transform: translate(0, -110%);
        }
    }

    .notification:after {
        content: "";
        position: absolute;
        top: 25px;
        left: -15px;
        width: 0;
        height: 0;
        border-right: 15px solid #cccccc;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;


        @media (max-width: 768px) {
            top: auto;
            left: 10px;
            bottom: -23px;
            width: 0;
            height: 0;
            border-top: 15px solid #cccccc;
            border-right: 8px solid transparent;
            border-left: 8px solid transparent;
        }
    }

    .notification.show {
        opacity: 1;
        pointer-events: auto;
    }

    .isBan + .checkbox-custom {
        border: 2px solid #e8e8e8;
        cursor: not-allowed;
    }

}