/*
 * METSTROYSETKA BASKET FOOTER FIX V1.1
 *
 * Scoped only to /basket/ legacy page.
 * Desktop layout mirrors the approved production footer:
 * 300 + 410 + 260 + 15 + 15 = 1000px.
 */

@media (min-width: 901px) {
    body.request-specification-page .footer {
        height: auto !important;
        min-height: 290px !important;
    }

    body.request-specification-page .footer-inner {
        box-sizing: border-box !important;

        width: 1000px !important;

        display: grid !important;
        grid-template-columns:
            300px
            minmax(0, 410px)
            260px !important;

        column-gap: 15px !important;
        align-items: start !important;

        margin: 0 auto !important;
        padding: 30px 0 28px !important;
    }

    body.request-specification-page .footer-left,
    body.request-specification-page .footer-links,
    body.request-specification-page .footer-right {
        box-sizing: border-box !important;

        float: none !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    body.request-specification-page .footer-left {
        width: 300px !important;
    }

    body.request-specification-page .footer-links {
        width: 410px !important;
        height: 170px !important;
        min-height: 170px !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;

        white-space: normal !important;
    }

    body.request-specification-page .footer-right {
        width: 260px !important;
        height: 170px !important;
        min-height: 170px !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;

        text-align: right !important;
    }

    body.request-specification-page .footer-nav-list {
        display: grid !important;

        grid-template-columns:
            1fr
            1fr !important;

        gap: 10px 20px !important;
    }

    body.request-specification-page .footer-policy-links-center {
        box-sizing: border-box !important;

        width: 100% !important;

        margin-top: auto !important;
        margin-bottom: 0 !important;

        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: center !important;

        gap: 16px !important;

        white-space: nowrap !important;
    }

    body.request-specification-page .footer-policy-links-center a {
        flex: 0 0 auto !important;

        font-size: 12px !important;
        line-height: 1.42 !important;
        font-weight: 400 !important;

        white-space: nowrap !important;
    }

    body.request-specification-page .footer-order-online {
        flex: 0 0 48px !important;

        width: 260px !important;
        max-width: 260px !important;
        height: 48px !important;

        margin-top: auto !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 900px) {
    body.request-specification-page .footer {
        height: auto !important;
        min-height: 0 !important;

        padding: 28px 22px !important;
    }

    body.request-specification-page .footer-inner {
        box-sizing: border-box !important;

        width: 100% !important;
        max-width: 760px !important;

        display: grid !important;

        grid-template-columns:
            1fr
            1fr !important;

        gap: 30px 40px !important;

        margin: 0 auto !important;
        padding: 0 !important;
    }

    body.request-specification-page .footer-left,
    body.request-specification-page .footer-links,
    body.request-specification-page .footer-right {
        width: auto !important;
        max-width: 100% !important;

        height: auto !important;
        min-height: 0 !important;

        float: none !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    body.request-specification-page .footer-left {
        order: 1;
    }

    body.request-specification-page .footer-right {
        order: 2;
    }

    body.request-specification-page .footer-links {
        grid-column: 1 / -1;
        order: 3;

        display: block !important;

        white-space: normal !important;
    }

    body.request-specification-page .footer-nav-list {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
    }

    body.request-specification-page .footer-policy-links-center {
        margin-top: 28px !important;

        display: flex !important;

        justify-content: flex-start !important;

        gap: 16px !important;
    }
}

@media (max-width: 640px) {
    body.request-specification-page .footer {
        padding: 26px 18px !important;
    }

    body.request-specification-page .footer-inner {
        grid-template-columns:
            1fr !important;

        gap: 28px !important;

        text-align: center !important;
    }

    body.request-specification-page .footer-left,
    body.request-specification-page .footer-right,
    body.request-specification-page .footer-section-title-right {
        text-align: center !important;
    }

    body.request-specification-page .footer-left,
    body.request-specification-page .footer-links,
    body.request-specification-page .footer-right {
        width: auto !important;
    }

    body.request-specification-page .footer-about-link {
        width: auto !important;
    }

    body.request-specification-page .footer-legal-copy-left {
        max-width: 420px !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.request-specification-page .site-counter-box {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.request-specification-page .footer-links {
        grid-column: auto !important;
    }

    body.request-specification-page .footer-nav-list {
        grid-template-columns:
            1fr
            1fr !important;

        gap: 11px 16px !important;
    }

    body.request-specification-page .footer-right {
        align-items: center !important;
    }

    body.request-specification-page .footer-order-online {
        width: 100% !important;
        max-width: 320px !important;
    }

    body.request-specification-page .footer-policy-links-center {
        margin-top: 22px !important;

        justify-content: center !important;
        flex-wrap: wrap !important;

        gap: 10px 20px !important;

        white-space: normal !important;
    }
}

@media (max-width: 420px) {
    body.request-specification-page .footer-nav-list {
        grid-template-columns:
            1fr !important;
    }
}

/*
 * METSTROYSETKA BASKET SPACING TUNE V1.2
 *
 * Keep /basket/ visually identical to the common footer.
 */

@media (min-width: 901px) {

    body.request-specification-page
    .footer-links,

    body.request-specification-page
    .footer-right {
        height:
            154px !important;

        min-height:
            154px !important;
    }

    body.request-specification-page
    .footer-section-title-right {
        margin-bottom:
            9px !important;
    }

    body.request-specification-page
    .footer-mail {
        margin-top:
            9px !important;
    }

    body.request-specification-page
    .footer-order-online {
        margin-top:
            auto !important;

        margin-bottom:
            0 !important;
    }
}

@media (max-width: 900px) {

    body.request-specification-page
    .footer-section-title-right {
        margin-bottom:
            9px !important;
    }

    body.request-specification-page
    .footer-mail {
        margin-top:
            9px !important;
    }

    body.request-specification-page
    .footer-order-online {
        margin-top:
            13px !important;
    }
}
