/* ==========================================================
   Blueprint Desktop Compatibility Polish

   Resolves cascade conflicts between original section styles
   and newer responsive composition layers.
   ========================================================== */

/* ==========================================================
   Final purchase header
   ========================================================== */

@media (min-width: 761px) {
    /*
     * The original final-purchase stylesheet may define this
     * header as a grid. Reset it so the eyebrow, title and
     * description form one centred editorial block.
     */

    .final-purchase__header {
        display: block !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        align-items: initial !important;
        gap: 0 !important;

        width: min(100%, 760px);
        max-width: 760px;

        margin:
            0
            auto
            2.5rem;

        text-align: center;
    }

    .final-purchase__header > * {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .final-purchase__eyebrow {
        display: inline-block;
        margin-bottom: .75rem;
    }

    .final-purchase__title {
        width: auto;
        max-width: 12ch;
        margin:
            0
            auto;

        text-align: center;
    }

    .final-purchase__header p {
        width: auto;
        max-width: 54ch;

        margin:
            1rem
            auto
            0;

        text-align: center;
    }
}

/* ==========================================================
   Desktop newsletter form
   ========================================================== */

@media (min-width: 761px) {
    /*
     * Explicit placement prevents generic form and button rules
     * from turning the desktop newsletter into a mobile stack.
     */

    .site-footer__newsletter {
        width: 100%;
        max-width: 680px;
        justify-self: end;
    }

    .site-footer__newsletter-fields {
        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            auto !important;

        grid-template-rows:
            minmax(50px, auto) !important;

        align-items: center;

        width: 100%;
        min-height: 64px;

        gap: .5rem;
        padding: .45rem;

        border-radius: 999px;
    }

    .site-footer__newsletter input {
        grid-column: 1 !important;
        grid-row: 1 !important;

        width: 100% !important;
        min-width: 0;
        min-height: 50px;

        margin: 0 !important;
    }

    .site-footer__newsletter-button {
        grid-column: 2 !important;
        grid-row: 1 !important;

        width: auto !important;
        min-width: 160px;
        min-height: 50px;

        margin: 0 !important;
        flex: 0 0 auto;

        white-space: nowrap;
    }

    .site-footer__newsletter-note {
        width: 100%;
    }
}

/*
 * The footer becomes one column at tablet widths, but the email
 * input and button should still remain horizontal until mobile.
 */

@media (min-width: 761px) and (max-width: 1080px) {
    .site-footer__newsletter {
        max-width: 700px;
        justify-self: start;
    }
}

/* ==========================================================
   Compact desktop safety
   ========================================================== */

@media (min-width: 761px) and (max-width: 900px) {
    .site-footer__newsletter-button {
        min-width: 145px;
        padding-inline: 1rem;
    }
}