#roof .vik-roof-calc {
    padding-top: 25px;
}

#roof .roof-calc-warning {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.4;
    color: #202020;
}

#roof .roof-material-row {
    max-width: 360px;
    margin-bottom: 25px;
}

#roof .roof-material-row label {
    width: 100%;
    font-size: 18px;
    color: #999;
}

#roof .roof-material-row select {
    width: 100%;
    height: 46px;
    margin-top: 8px;
    padding: 0 35px 0 16px;
    border: 0;
    border-bottom: 1px solid #b8b8b8;
    border-radius: 0;
    background-color: transparent;
    font-size: 18px;
    color: #202020;
    outline: none;
}

#roof .roof-type-title {
    margin-bottom: 14px;
    font-size: 20px;
    color: #202020;
}

#roof .roof-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 55px;
    margin-bottom: 35px;
}

#roof .roof-type-card {
    position: relative;
    display: block;
    cursor: pointer;
}

#roof .roof-type-card input {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #744a9b;
    z-index: 2;
}

#roof .roof-type-card img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: 0.2s;
}

#roof .roof-type-card input:checked + img {
    border-color: #744a9b;
    box-shadow: 0 0 0 4px rgba(116, 74, 155, 0.14);
}

#roof .roof-type-card span {
    display: block;
    margin-left: 32px;
    font-size: 18px;
}

#roof .roof-type-card input:checked ~ span {
    color: #202020;
}

#roof .roof-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px 28px;
    margin-bottom: 22px;
}

#roof .roof-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9a9a9a;
    font-size: 17px;
}

#roof .roof-field span {
    white-space: nowrap;
}

#roof .roof-field input {
    width: 100%;
    max-width: 260px;
    height: 50px;
    padding: 0 16px;
    border: 1px solid #9da4b3;
    border-radius: 12px;
    background: #fff;
    font-size: 18px;
    outline: none;
}

#roof .roof-field input:focus {
    border-color: #744a9b;
    box-shadow: 0 0 0 3px rgba(116, 74, 155, 0.12);
}

#roof .roof-field input.inp-danger {
    border-color: #e04b4b;
}

#roof .vik-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    height: 58px;
    padding: 0 28px;
    border: 1px solid #744a9b;
    border-radius: 14px;
    background: #744a9b;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
}

#roof .vik-calc-btn:hover {
    background: #623c88;
    border-color: #623c88;
    color: #fff;
}

#roof #roofResult {
    margin-top: 25px;
}

#roof #roofResult .table {
    width: 100%;
    margin-bottom: 24px;
}

#roof .roof-send-form {
    max-width: 480px;
}

#roof .roof-send-form input[type="text"],
#roof .roof-send-form input[type="email"],
#roof .roof-send-form input[type="tel"] {
    height: 48px;
    margin-bottom: 10px;
    border-radius: 10px;
}

@media (max-width: 991px) {

    #roof .roof-type-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    #roof .roof-type-card img {
        max-width: 100%;
    }

    #roof .roof-calc-grid {
        grid-template-columns: 1fr;
    }

    #roof .roof-field {
        display: block;
    }

    #roof .roof-field span {
        display: block;
        margin-bottom: 6px;
        white-space: normal;
    }

    #roof .roof-field input {
        max-width: 100%;
    }
}

/* Форма отправки расчёта кровли — в стиле штакетника */

#roof .roof-send-form {
    width: 100%;
    max-width: none;
    margin-top: 30px;
    padding: 28px 32px 24px;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

#roof .roof-send-form label {
    display: block;
    margin-bottom: 22px;
    color: #9a9a9a;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
}

#roof .roof-send-form input[type="text"],
#roof .roof-send-form input[type="email"],
#roof .roof-send-form input[type="tel"] {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0 0 14px;
    padding: 0 22px;
    border: 0;
    border-bottom: 1px solid #b8b8b8;
    border-radius: 0;
    background: transparent;
    color: #202020;
    font-size: 20px;
    line-height: 48px;
    outline: none;
    box-shadow: none;
}

#roof .roof-send-form input[type="text"]::placeholder,
#roof .roof-send-form input[type="email"]::placeholder,
#roof .roof-send-form input[type="tel"]::placeholder {
    color: #9a9a9a;
    opacity: 1;
}

#roof .roof-send-form input[type="text"]:focus,
#roof .roof-send-form input[type="email"]:focus,
#roof .roof-send-form input[type="tel"]:focus {
    border-bottom-color: #744a9b;
    box-shadow: none;
}

#roof .roof-send-form input.inp-danger {
    border-bottom-color: #e04b4b;
}

#roof .roof-send-form .vik-calc-btn,
#roof .roof-send-form input[type="button"].vik-calc-btn {
    width: 100%;
    height: 58px;
    margin-top: 12px;
    border: 0;
    border-radius: 12px;
    background: #744a9b;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

#roof .roof-send-form .vik-calc-btn:hover,
#roof .roof-send-form input[type="button"].vik-calc-btn:hover {
    background: #623c88;
    color: #fff;
}

#roof .roof-send-status {
    margin-top: 18px;
}


/* Фасад */

#facade .vik-facade-calc {
    padding-top: 25px;
}

#facade .facade-calc-warning {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.4;
    color: #202020;
}

#facade h4 {
    margin: 28px 0 14px;
    font-size: 22px;
    font-weight: 500;
    color: #202020;
}

#facade .facade-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px 28px;
    margin-bottom: 22px;
}

#facade .facade-calc-grid label,
#facade .facade-row label {
    display: block;
    color: #9a9a9a;
    font-size: 17px;
}

#facade select,
#facade input[type="number"],
#facade input[type="text"],
#facade input[type="email"],
#facade input[type="tel"] {
    width: 100%;
    height: 50px;
    margin-top: 7px;
    padding: 0 16px;
    border: 1px solid #9da4b3;
    border-radius: 12px;
    background: #fff;
    color: #202020;
    font-size: 18px;
    outline: none;
}

#facade input:focus,
#facade select:focus {
    border-color: #744a9b;
    box-shadow: 0 0 0 3px rgba(116, 74, 155, 0.12);
}

#facade input.inp-danger {
    border-color: #e04b4b;
}

#facade .facade-row {
    position: relative;
    display: grid;
    grid-template-columns: 120px repeat(3, minmax(160px, 1fr)) 46px;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
    padding: 18px;
    background: #fff;
    border-radius: 12px;
}

#facade .facade-wall-row {
    grid-template-columns: 120px repeat(2, minmax(180px, 1fr)) 46px;
}

#facade .facade-row-title {
    padding-bottom: 14px;
    color: #202020;
    font-size: 18px;
    font-weight: 500;
}

#facade .facade-remove-row {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: #ececf3;
    color: #744a9b;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

#facade .facade-remove-row:hover {
    background: #744a9b;
    color: #fff;
}

#facade .vik-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    height: 58px;
    padding: 0 28px;
    border: 0;
    border-radius: 14px;
    background: #744a9b;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
}

#facade .vik-calc-btn:hover {
    background: #623c88;
    color: #fff;
}

#facade .vik-calc-btn-small {
    min-width: 190px;
    height: 48px;
    font-size: 16px;
}

#facade .facade-actions {
    margin-top: 28px;
}

#facade #facadeResult {
    margin-top: 30px;
}

#facade #facadeResult .table {
    width: 100%;
    margin-bottom: 24px;
}

#facade .facade-summary {
    margin-bottom: 20px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 12px;
}

#facade .facade-summary p {
    margin: 4px 0;
    font-size: 17px;
}

#facade .facade-send-form {
    width: 100%;
    max-width: none;
    margin-top: 30px;
    padding: 28px 32px 24px;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

#facade .facade-send-form label {
    display: block;
    margin-bottom: 22px;
    color: #9a9a9a;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
}

#facade .facade-send-form input[type="text"],
#facade .facade-send-form input[type="email"],
#facade .facade-send-form input[type="tel"] {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0 0 14px;
    padding: 0 22px;
    border: 0;
    border-bottom: 1px solid #b8b8b8;
    border-radius: 0;
    background: transparent;
    color: #202020;
    font-size: 20px;
    line-height: 48px;
    outline: none;
    box-shadow: none;
}

#facade .facade-send-form .vik-calc-btn {
    width: 100%;
    height: 58px;
    margin-top: 12px;
    border: 0;
    border-radius: 12px;
    background: #744a9b;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

@media (max-width: 991px) {
    #facade .facade-calc-grid,
    #facade .facade-row,
    #facade .facade-wall-row {
        grid-template-columns: 1fr;
    }

    #facade .facade-remove-row {
        width: 100%;
    }
}

.calc-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.calc-consent input[type="checkbox"] {
    margin-top: 3px;
    flex: 0 0 auto;
}

.calc-consent-required {
    color: #e53935;
    margin-left: 2px;
}

.calc-consent-link {
    color: #1677ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.calc-consent-link:hover {
    text-decoration-thickness: 2px;
}


/* Исправление конфликта калькулятора с футером сайта */
@media only screen and (min-width: 310px) and (max-width: 999px) {

    .footer .col-4 {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .footer .col-3.offset-1 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }
}