/* PLAT-22704: BFCM 2026 top hat (Figma CRT-Design--BFCM-2026, "Static - Original").
   Loaded last in _Layout and only while the bar renders. Mobile first (Figma 360 frame),
   then 768 / 1024 / 1200 (logo) / 1440 / 1600 (one-line copy). No z-index: the sticky nav,
   mobile drawer and modals all sit above it. */
.bfcm-bar {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 78px;
    background: #1856ed;
    border-bottom: 2px solid #d8ff78;
    color: #fff;
    font-family: 'Lexend', sans-serif;
}
.bfcm-bar *, .bfcm-bar *::before, .bfcm-bar *::after { box-sizing: border-box; }

.bfcm-bar__scarf {
    position: absolute;
    top: 0;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}
.bfcm-bar__scarf--left {
    left: 0;
    top: 12px;
    width: 46px;
    height: 66px;
    background-image: url("images/bfcm/scarf-360.svg");
}
.bfcm-bar__scarf--right { display: none; right: 0; transform: scaleX(-1); }

.bfcm-bar__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 12px 10px;
}
.bfcm-bar__logo { display: none; }

.bfcm-bar__copy {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 17px;
    text-align: center;
}
.bfcm-bar__copy span { display: block; }

.bfcm-bar__cta {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 336px;
}
.bfcm-bar a.bfcm-bar__btn { display: none; }
.bfcm-bar a.bfcm-bar__link,
.bfcm-bar a.bfcm-bar__link:hover {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-decoration: none;
}
.bfcm-bar__terms,
.bfcm-bar a.bfcm-bar__terms,
.bfcm-bar a.bfcm-bar__terms:hover {
    position: absolute;
    right: 0;
    bottom: 0;
    color: #fff;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    text-decoration: underline;
    white-space: nowrap;
}

.bfcm-bar__close { display: none; }

/* Beats the pink theme's body.sl-pink a/button:focus-visible (0,2,2), whose 35% pink ring is
   near-invisible on the blue bar. White on the blue (5.8:1); the X sits on the lime/cyan scarf,
   so it gets the bar blue instead (>= 3.3:1 on both). */
.bfcm-bar.bfcm-bar a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.bfcm-bar.bfcm-bar button.bfcm-bar__close:focus-visible {
    outline: 2px solid #1856ed;
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .bfcm-bar {
        min-height: 56px;
        height: 56px;
        border-bottom: 0;
    }
    .bfcm-bar__scarf--left,
    .bfcm-bar__scarf--right {
        display: block;
        top: 0;
        width: 85px;
        height: 56px;
        background-image: url("images/bfcm/scarf-768.svg");
    }
    .bfcm-bar__inner {
        flex-direction: row;
        justify-content: center;
        gap: 32px;
        height: 56px;
        padding: 0 56px;
    }
    .bfcm-bar__copy {
        font-size: 16px;
        line-height: 20px;
    }
    .bfcm-bar__cta {
        width: auto;
        max-width: none;
        gap: 12px;
    }
    .bfcm-bar a.bfcm-bar__link { display: none; }
    .bfcm-bar a.bfcm-bar__btn,
    .bfcm-bar a.bfcm-bar__btn:hover {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        padding: 0 24px;
        border-radius: 12px;
        background: #fff;
        color: #1856ed;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        text-decoration: none;
        white-space: nowrap;
    }
    .bfcm-bar a.bfcm-bar__btn:hover { background: #f7faff; }
    .bfcm-bar__terms,
    .bfcm-bar a.bfcm-bar__terms,
    .bfcm-bar a.bfcm-bar__terms:hover {
        position: static;
        font-size: 12px;
        line-height: 16px;
        text-decoration: none;
    }
    .bfcm-bar a.bfcm-bar__terms { text-decoration: underline; }
    .bfcm-bar__close {
        position: absolute;
        top: 50%;
        right: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        margin-top: -12px;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
    }
    .bfcm-bar__close img { display: block; }
}

@media (min-width: 1024px) {
    .bfcm-bar__scarf--left,
    .bfcm-bar__scarf--right {
        width: 193px;
        background-image: url("images/bfcm/scarf-1024.svg");
    }
}

@media (min-width: 1200px) {
    .bfcm-bar__logo {
        display: block;
        width: auto;
        height: 32px;
    }
}

@media (min-width: 1440px) {
    .bfcm-bar__scarf--left,
    .bfcm-bar__scarf--right {
        width: 343px;
        background-image: url("images/bfcm/scarf-1440.svg");
    }
}

@media (min-width: 1600px) {
    .bfcm-bar__copy {
        line-height: 24px;
        white-space: nowrap;
    }
    .bfcm-bar__copy span { display: inline; }
}
