:root {
    --main-color: #c8180f;
}

.calc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.calc-col-1 {
    flex: 1 1 40%;
}

.calc-col-2 {
    flex: 1 0.5 55%;
    position: relative;
}

.calc-col-1, .calc-col-2 {
    background: #f9f9f9;
    padding: 25px;
    box-sizing: border-box;
}




.calc-select {
    position: relative;

    font-family: Arial, sans-serif;
}

.calc-select-header {
    padding: 15px 16px;
    border: 1px solid var(--main-color);
    cursor: pointer;
    transition: all 0.5s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.0);
}

.calc-select-header:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Стрелка */
.calc-select-header::after {
    content: 'ᐁ';
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #020202;
}

.calc-select.open .calc-select-header::after {
    transform: rotate(180deg);
}

.calc-select.open .calc-select-header {
    border-radius: 6px 6px 0 0;
}

.calc-options-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--main-color);
    border-top: none;
    border-radius: 0 0 6px 6px;

    /* Начальное состояние */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    /* Анимация */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Тень */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Скролл */
    max-height: 226px;
    overflow-y: auto;

    z-index: 2;
}

/* Состояние при открытии */
.calc-select.open .calc-options-list {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.calc-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

/* Эффект при наведении */
.calc-option:hover {
    background: #f8f9fa;
}

/* Эффект ripple при клике */
.calc-option::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(52, 152, 219, 0.3);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.calc-option:active::after {
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Стилизация скроллбара */
.calc-options-list::-webkit-scrollbar {
    width: 8px;
}

.calc-options-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 6px 6px 0;
}

.calc-options-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.calc-options-list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}


.calc-img {
    max-height: 250px;
    max-width: 250px;
    margin: 30px auto 0 auto;
    display: block;
}


.calc-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 50px;
}

.calc-field {
    position: relative;
    flex: 40%;
}

.calc-field input[type="number"], .calc-field input[type="text"] {
    border: 1px solid var(--main-color);
    outline: 0;
    background: rgba(255, 255, 255, 0.0);
    transition: all 0.5s ease;
    text-align: left;
    width: 100%;
    height: 56px;
    padding: 0 50px 0 18px;
    font-size: 18px;
    font-weight: 300;
    -webkit-transition: background .15s linear;
    -o-transition: background .15s linear;
    transition: background .15s linear;
    box-sizing: border-box;
}

.calc-field input[type="number"]:hover, .calc-field input[type="text"]:hover {
    background: rgba(255, 255, 255, 0.7);
}

.calc-form-unit {
    position: absolute;
    right: 15px;
    bottom: 19px;
    color: #020202;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}

.calc-field label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: #292929;
    margin: 0 0 8px;
    white-space: nowrap;
}

.calc-field {
    display: none;
}

.calc-type {
    width: 100%;

}

.calc-type .calc-select-header {
    padding: 28px 16px;
    font-size: 20px;
}

.calc-result-row {
    display: flex;
    width: 100%;
    align-items: center;
    background: #f9f9f9;
    padding: 22px 15px;
    box-sizing: border-box;
    margin-top: 20px;
}

.calc-result-col {
    flex: 1;
    text-align: center;
    align-self: normal;
}

.calc-result-divider {
    width: 1px;
    height: 54px;
    background-color: #ccc;
}

.calc-result-header {
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 15px;
    color: #4c4c4c;
}

.calc-result-container {
    display: inline-block;
    text-align: left;
}

.calc-result-line {
    font-size: 19px;
}

.calc-res-value {
    font-weight: bold;
    font-size: 26px;
}

.calc-result-line {
    font-size: 19px;
    color: #5e5e5e;
}

.calc-res-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #898989;
    left: 0;
    color: #eee;
    padding: 15px;
    box-sizing: border-box;
    font-size: 20px;
}

.calc-res-value-total {
    font-weight: bold;
    font-size: 27px;
}

.calc-buttons {
    display: flex;
    justify-content: end;
    gap: 18px;
    margin-top: 18px;
}

span.calc-icon {
    vertical-align: middle;
    display: inline-block;
    margin-right: 3px;
}
.calc-buttons a {
    color:var(--main-color);
    font-size: 20px;
    text-decoration: none;
}
.calc-buttons a:hover {
    text-decoration: underline;
}

.calc-buttons svg g{
    fill: var(--main-color);
}

.calc-buttons svg path {
    stroke: var(--main-color);
}

.print_block {
    display: none;
}

.calс-to-cart-block {
    margin-top: 26px;
    text-align: center;
}

.calс-to-cart-block.hidden_state {
    display: none;
}

.calс-to-cart-block.ready_state .to_cart_link, .calс-to-cart-block.ready_state .to_cart_success, .calс-to-cart-block.ready_state .loader {
    display: none;
}

.calс-to-cart-block.loading_state .to_cart_link, .calс-to-cart-block.loading_state .to_cart_success{
    display: none;
}

.calс-to-cart-block.loading_state .to_cart_text {
    visibility: hidden;

}
.calс-to-cart-block.loading_state .to_cart_btn {
    padding-top: 1px;
    padding-bottom: 16px;
}

.calс-to-cart-block.complete_state .to_cart_btn {
    display: none;
}


.to_cart_success {
    color: #0e701b;
    font-size: 12px;
}









/* HTML: <div class="loader"></div> */
.loader {
    margin: 0 auto;
    width: 30px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation:
            l20-1 0.8s infinite linear alternate,
            l20-2 1.6s infinite linear;
}
@keyframes l20-1{
    0%    {clip-path: polygon(50% 50%,0       0,  50%   0%,  50%    0%, 50%    0%, 50%    0%, 50%    0% )}
    12.5% {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100%   0%, 100%   0%, 100%   0% )}
    25%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 100% 100%, 100% 100% )}
    50%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
    62.5% {clip-path: polygon(50% 50%,100%    0, 100%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
    75%   {clip-path: polygon(50% 50%,100% 100%, 100% 100%,  100% 100%, 100% 100%, 50%  100%, 0%   100% )}
    100%  {clip-path: polygon(50% 50%,50%  100%,  50% 100%,   50% 100%,  50% 100%, 50%  100%, 0%   100% )}
}
@keyframes l20-2{
    0%    {transform:scaleY(1)  rotate(0deg)}
    49.99%{transform:scaleY(1)  rotate(135deg)}
    50%   {transform:scaleY(-1) rotate(0deg)}
    100%  {transform:scaleY(-1) rotate(-135deg)}
}

@media (max-width: 670px) {
    .calc-buttons {
        justify-content: center;

    }

}

@media (max-width: 600px) {
    .calc-result-row {
        flex-direction: column;
    }

    .calc-result-divider {
        width: 80%;
        height: 1px;
        background-color: #ccc;
        margin: 12px 4px;
    }
}