/* Калькулятор фасонных элементов — /uslugi/gibka-metalla/ */

.gm-calc {
    margin-bottom: 60px;
    color: #000;
}

/* неактивные профили: поля и чертежи */
.gm-calc [hidden] {
    display: none !important;
}

.gm-calc .gm-calc__title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
    padding: 0;
}

/* плитки профилей */
.gm-calc__tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px 36px;
    margin-bottom: 36px;
}

.gm-calc .gm-calc__tab {
    display: block;
    height: 76px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #8a8a8a;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s;
}

.gm-calc .gm-calc__tab:hover {
    border-color: #000;
}

.gm-calc .gm-calc__tab.is-active {
    border: 2px solid #000;
}

.gm-calc__tab svg {
    display: block;
    width: 100%;
    height: 100%;
}

.gm-calc__tab path {
    fill: none;
    stroke: #8a8a8a;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.gm-calc__tab.is-active path {
    stroke: #000;
}

/* заголовок выбранного профиля */
.gm-calc .gm-calc__name {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 20px;
}

.gm-calc__body {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.gm-calc__form {
    flex: 0 0 284px;
}

/* поля */
.gm-calc__fields {
    display: grid;
    grid-template-columns: repeat(2, 124px);
    gap: 18px 36px;
    margin-bottom: 18px;
}

.gm-calc__fields--length {
    margin-bottom: 30px;
}

.gm-calc .gm-calc__field {
    position: relative;
    display: block;
    height: 56px;
    margin: 0;
    border: 1px solid #8a8a8a;
    border-radius: 10px;
    background: #fff;
    cursor: text;
}

.gm-calc .gm-calc__field--wide {
    grid-column: 1 / -1;
}

.gm-calc .gm-calc__field.is-error {
    border-color: #eb3223;
}

.gm-calc__field-name {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
}

.gm-calc__unit {
    position: absolute;
    right: 8px;
    bottom: 6px;
    font-size: 10px;
    line-height: 1;
    color: #8a8a8a;
    text-transform: uppercase;
}

.gm-calc .gm-calc__field input.gm-calc__input {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8px 8px 8px 8px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    font-size: 16px !important;
    line-height: 1;
    color: #000;
    text-align: center;
    outline: none;
}

.gm-calc .gm-calc__field input.gm-calc__input::placeholder {
    color: #868686;
    font-size: 12px;
    opacity: 1;
}

.gm-calc .gm-calc__submit {
    display: block;
    width: 100%;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #eb3223;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.gm-calc .gm-calc__submit:hover {
    background: #c9281b;
}

/* чертёж */
.gm-calc__drawing {
    flex: 1;
    min-width: 0;
}

.gm-calc__drawing svg {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    margin-left: auto;
    /*max-height: 400px;*/
}



.gm-calc__drawing text {
    font-size: 22px;
    font-family: "Roboto", sans-serif;
    text-anchor: middle;
    fill: #000;
}

/* результат */
.gm-calc__result {
    margin-top: 36px;
}

.gm-calc .gm-calc__result-price {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.gm-calc__price {
    font-weight: 700;
}

.gm-calc .gm-calc__note {
    margin: 0;
    font-size: 12px;
    color: #8a8a8a;
}

@media (max-width: 991px) {
    .gm-calc__tabs {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .gm-calc__tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .gm-calc__body {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 24px;
    }

    .gm-calc__form {
        flex: none;
    }

    .gm-calc__fields {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 12px;
    }

    .gm-calc__fields--length {
        margin-bottom: 24px;
    }

    .gm-calc .gm-calc__name,
    .gm-calc .gm-calc__result-price {
        font-size: 22px;
    }
}
