/* Banner (sections/banner.php): the 1289 x 383 photo card on white, 56px over the next section; the copy 58px in
   and 48px down, the QR tile 81px from its right edge */
.sales-banner {
    padding: 0 0 56px;
    background: #fff;
}

/* 1289 wide on the 1290 grid: its left edge on the grid's (a centred 1289 would sit half a pixel off) */
.sales-banner__container {
    width: min(1289px, 100% - 48px);
    margin: 0 auto 0 max(24px, 50% - 645px);
}

.sales-banner__box {
    position: relative;
    display: flex;
    min-height: 383px;
    box-sizing: border-box;
    overflow: hidden;
    padding: 48px 0 39px 58px;
    border-radius: 24px;
    background: #000;
}

.sales-banner__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.sales-banner__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 582px;
    max-width: calc(100% - 58px);
}

/* the design's 74px title box (two 36px lines on their caps) and its 14px line */
.sales-page .sales-banner__title {
    width: 449.42px;
    max-width: 100%;
    min-height: 74px;
    margin: 0;
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    line-height: 36px;
}

.sales-page .sales-banner__title .green {
    color: var(--ltb-green);
}

/* a line break in the title is the design's new paragraph (16px more, sections/banner.php); the design keeps its
   74px box, so the line under it does not move */
.sales-banner__para {
    display: block;
    height: 16px;
}

.sales-page .sales-banner__title:has(.sales-banner__para) {
    margin-bottom: -7.6px;
}

.sales-page .sales-banner__desc {
    width: 397px;
    max-width: 100%;
    min-height: 14px;
    margin: 30px 0 0;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
}

.sales-page .sales-banner__desc strong {
    font-weight: 700;
}

.sales-page .sales-banner__note {
    width: 100%;
    margin: 47px 0 0;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

@supports (text-box: trim-both cap alphabetic) {
    .sales-page :is(.sales-banner__title, .sales-banner__desc, .sales-banner__note) {
        text-box: trim-both cap alphabetic;
    }
}

/* the 168.74 x 49.64 green pill, its label centred (15px); the design's line runs to two lines out of its 14px box,
   the button 73px under that box: 49px under the second line */
.sales-page .sales-banner__btn {
    min-width: 168.74px;
    max-width: 100%;
    height: auto;
    min-height: 49.64px;
    margin-top: 49px;
    padding: 8px 18px;
    border-radius: 24px;
    background: var(--ltb-green-muted);
    color: var(--ltb-carbon);
    font-size: 15px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    /* the design's case (the site's app links are uppercase with !important) */
    text-transform: none !important;
    white-space: normal;
}

@media (hover: hover) and (pointer: fine) {
    .sales-page .sales-banner__btn:hover {
        background: #000;
        color: var(--ltb-green);
    }
}

/* the QR: a 192px white tile (r24, its soft shadow), the code 29.6px in, the green corners around it */
.sales-banner__qr {
    position: absolute;
    top: 94.5px;
    right: 77.78px;
    z-index: 1;
    width: 197.02px;
    height: 196.69px;
}

.sales-banner__tile {
    position: absolute;
    top: 2.5px;
    left: 1.5px;
    width: 192px;
    height: 192px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 92.08px 91.1px 25.96px rgba(0, 0, 0, .02), 51.92px 50.94px 22.04px rgba(0, 0, 0, .06), 23.51px 22.53px 16.16px rgba(0, 0, 0, .1), 5.88px 5.88px 8.82px rgba(0, 0, 0, .12);
}

.sales-banner__code {
    position: absolute;
    top: 29.59px;
    left: 29.59px;
    display: block;
    width: 132.81px;
    height: 132.81px;
    opacity: 0;
    transition: opacity .3s ease;
}

.sales-banner__code.is-ready {
    opacity: 1;
}

.sales-banner__corners {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* no QR below desktop (no room beside the copy; phones get the app from the button) */
@media (max-width: 1023px) {
    .sales-banner__qr {
        display: none;
    }
}

/* phones: a black card, the copy on top (23px in), the photo under it */
@media (max-width: 767px) {
    .sales-banner {
        padding-bottom: 40px;
    }

    .sales-banner__container {
        width: calc(100% - 25px);
        margin: 0 auto;
    }

    .sales-banner__box {
        flex-direction: column;
        min-height: 0;
        padding: 0;
        border-radius: 16px;
    }

    .sales-banner__copy {
        order: 1;
        width: auto;
        max-width: none;
        padding: 43px 23px 32px;
    }

    .sales-banner__img {
        position: relative;
        order: 2;
        height: auto;
        aspect-ratio: 365 / 230;
        object-position: var(--sales-focus, 50% 50%);
    }

    .sales-page .sales-banner__title {
        width: 100%;
        min-height: 0;
        font-size: 32px;
        line-height: 40px;
    }

    .sales-page .sales-banner__desc {
        width: 100%;
        min-height: 0;
        margin-top: 24px;
        font-size: 16px;
        line-height: 22px;
    }

    .sales-page .sales-banner__btn {
        width: 100%;
        min-height: 52px;
        margin-top: 40px;
        border-radius: 26px;
        font-size: 16px;
    }

    .sales-page .sales-banner__note {
        margin-top: 24px;
    }
}

/* the photo and the corners are pictures only: a drag over them selects the copy instead of dragging the image */
.sales-banner__img,
.sales-banner__corners {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
