@layer components {
    .promotion-banner {
            align-items: center;
            background: #0f172a;
            color: #e2e8f0;
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin: 1rem var(--dashboard-section-padding-x) 0;
            padding: 0.875rem 1rem;
        }

    /* Taller than the banner's text, so it takes the padding's room instead of adding height */
    .promotion-banner__image {
            flex: 0 0 auto;
            height: 3.5rem;
            margin: -0.25rem 0;
            width: auto;
        }

    .promotion-banner__content {
            align-items: flex-start;
            display: flex;
            flex: 1 1 16rem;
            flex-direction: column;
            gap: 0.375rem;
            min-width: 0;
        }

    .promotion-banner__badge {
            background: #fde047;
            border-radius: var(--dashboard-radius-pill);
            color: #0f172a;
            flex: 0 0 auto;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            line-height: 1;
            padding: 0.375rem 0.625rem;
            text-transform: uppercase;
        }

    .promotion-banner__text {
            font-size: 0.9375rem;
            line-height: 1.5;
            margin: 0;
        }

    .promotion-banner__text strong {
            color: #ffffff;
            font-weight: 700;
        }

    .promotion-banner__action {
            background: #ffffff;
            border-radius: var(--dashboard-radius-pill);
            color: #0f172a;
            flex: 0 0 auto;
            font-size: 0.875rem;
            font-weight: 700;
            line-height: 1;
            padding: 0.625rem 1rem;
            text-decoration: none;
        }

    .promotion-banner__action:hover {
            background: #e2e8f0;
        }

    .promotion-banner__action:focus-visible,
        .promotion-banner__dismiss:focus-visible {
            outline: 2px solid #fde047;
            outline-offset: 2px;
        }

    .promotion-banner__dismiss {
            align-items: center;
            border-radius: var(--dashboard-radius-pill);
            color: #cbd5e1;
            display: inline-flex;
            flex: 0 0 auto;
            height: 2rem;
            justify-content: center;
            width: 2rem;
        }

    .promotion-banner__dismiss:hover {
            background: rgb(255 255 255 / 0.12);
            color: #ffffff;
        }

    .promotion-banner__dismiss i,
        .promotion-banner__dismiss svg {
            height: 1.25rem;
            width: 1.25rem;
        }

    /* Stacked: the text and the picture side by side, the button below, and the
       dismiss button in the corner above the picture */
    @media (max-width: 40rem) {
        .promotion-banner {
                align-items: start;
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                position: relative;
            }

        .promotion-banner__content {
                grid-column: 1;
                grid-row: 1;
            }

        .promotion-banner__image {
                align-self: end;
                grid-column: 2;
                grid-row: 1;
                height: 3.5rem;
                margin: 2rem 0 0;
            }

        .promotion-banner__action {
                grid-column: 1 / -1;
                grid-row: 2;
                justify-self: start;
            }

        .promotion-banner__dismiss {
                position: absolute;
                right: 0.5rem;
                top: 0.5rem;
            }
    }
}
