/**
 * Raft Sale Sticker
 */

.banner-slide {
    position: relative;
}

.raft-sale-sticker {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    display: flex;
    padding: 10px;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    animation: raft-sticker-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes raft-sticker-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

@media (max-width: 767px) {
    .raft-sale-sticker {
        width: 60px;
        height: 60px;
        font-size: 12px;
        top: 20px;
        left: 20px;
    }
}

/**
 * Raft Sale Bar (USP strip)
 * CMS block identifier: raft_sale_bar
 *
 * Each direct child of the list is a slide — the live CMS block uses
 * <div> children, the docs example uses <li>; both work. Rules are scoped
 * to .raft-sale-bar because the same CMS block is also rendered inside
 * the megamenu, where it must keep its normal flow:
 * <ul class="raft-sale-bar__list">
 *   <li><svg class="raft-icon"><use href="#raft-icon-swatch"/></svg> Item One</li>
 *   <li><a href="/link-2">Item Two</a></li>
 * </ul>
 *
 * Slides cross-fade upwards every 4.5s (js/sale-bar.js).
 * Background/text colours come from admin config as an inline style on
 * .raft-sale-bar (raft_sale/general/bg_colour + text_colour).
 */

.raft-sale-bar {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid #D5D0CA;
    border-bottom: 1px solid #D5D0CA;
}

/* Centred container, matching the header (container-raft) */
.raft-sale-bar__inner {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 6px clamp(1rem, 4vw, 2.5rem);
}

/* Height lives on the list itself — the CMS content can introduce extra
   wrapper divs, which would break a height:100% chain */
.raft-sale-bar .raft-sale-bar__list {
    display: block !important;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    height: 14px;
    overflow: hidden;
}

.raft-sale-bar .raft-sale-bar__list > * {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    transform: translateY(6px);
    visibility: hidden;
}

/* Optional per-slide icon, added by the merchant in the CMS block:
   <div><svg class="raft-icon"><use href="#raft-icon-swatch"/></svg> Text</div>
   The sprite lives in Magento_Theme::html/header/icons.phtml */
.raft-sale-bar .raft-sale-bar__list .raft-icon {
    color: currentColor;
    flex: none;
    height: 12px;
    width: 12px;
    stroke-width: 1.4;
}

/* Show the first slide before JS initialises */
.raft-sale-bar .raft-sale-bar__list:not(:has(.is-active)) > *:first-child {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Fade up into view */
.raft-sale-bar .raft-sale-bar__list > *.is-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s;
}

/* Fade up and out */
.raft-sale-bar .raft-sale-bar__list > *.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    visibility: visible;
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s 0.5s;
}

/* Incoming slide waits below the strip, unanimated */
.raft-sale-bar .raft-sale-bar__list > *.is-below {
    opacity: 0;
    transform: translateY(6px);
    transition: none;
}

.raft-sale-bar .raft-sale-bar__list a {
    color: inherit;
    text-decoration: none;
}

.raft-sale-bar .raft-sale-bar__list a:hover {
    text-decoration: underline;
}

@media (min-width: 640px) {
    .raft-sale-bar .raft-sale-bar__list > * {
        font-size: 10px;
    }
}
