/*
    Target: Black Friday Banner
    Description: Sitewide top banner for the Black Friday bonus points promotion,
                 styled with the weight care sub-brand.
*/

@keyframes tfc-bfb-slide-out {
    from { opacity: 1; max-height: 120px; }
    to   { opacity: 0; max-height: 0; }
}

.tfc-bfb {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: 'Work Sans', sans-serif;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(45deg, #eae7c5, #9ca37c) 1;
}

.tfc-bfb--closing {
    animation: tfc-bfb-slide-out 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.tfc-bfb__inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 52px 10px 20px; /* right padding leaves room for the close button */
}

.tfc-bfb__link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.tfc-bfb__tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: linear-gradient(45deg, #eae7c5, #9ca37c);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tfc-bfb__message strong {
    color: #eae7c5;
    font-weight: 700;
}

.tfc-bfb__cta {
    font-weight: 600;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tfc-bfb__link:hover .tfc-bfb__cta,
.tfc-bfb__link:focus-visible .tfc-bfb__cta {
    color: #eae7c5;
}

.tfc-bfb__link:focus-visible,
.tfc-bfb__close:focus-visible {
    outline: 2px solid #eae7c5;
    outline-offset: 2px;
    border-radius: 4px;
}

.tfc-bfb__close {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: none;
    border-radius: 6px;
    background: none;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.18s ease;
}

.tfc-bfb__close:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Match the old top bar: hide while a TFC modal is open. */
.tfc-modal--open .tfc-bfb {
    display: none;
}

@media (max-width: 600px) {
    .tfc-bfb__inner {
        padding: 7px 40px 7px 12px;
    }
    .tfc-bfb__link {
        font-size: 13px;
        line-height: 1.35;
        gap: 4px 8px;
    }
    /* The whole bar is the link, so the CTA text is dropped to keep it compact. */
    .tfc-bfb__cta {
        display: none;
    }
    .tfc-bfb__tag {
        font-size: 11px;
        padding: 1px 8px;
    }
    .tfc-bfb__close {
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tfc-bfb--closing {
        animation: none;
    }
}
