/* MarketBeat All Access — Fall Lock-In Sale theme (warm cream-to-amber, rust accents, drifting leaves). */
:root {
    --fall-rust: #C4511B;
    --fall-rust-dark: #9C3A0F;
    --fall-brown: #4A2412;
    --fall-gold: #E08A1E;
    --fall-line: #E3A45C;
}

/* Landing-page reskin headings use Arbutus Slab. */
@font-face {
    font-family: 'Arbutus Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/Style/fonts/ArbutusSlab-Regular.woff2) format('woff2');
}

/* ============ Top discount strip ============ */
.d-print-none.py-1.bg-blue.text-center.d-minimal-none {
    background-color: var(--fall-rust);
}

/* ============ Banner / Hello Bar background ============ */
.bg-promo {
    position: relative;
    inset: 0;
    background: linear-gradient(110deg, #FFF9EE 0%, #FCE8C8 60%, #F6CE93 100%);
    background-size: cover;
    background-position: center;
}

.bg-promo::before,
.bg-promo::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(192px, 30%, 400px);
    pointer-events: none;
    z-index: 1;
    background-repeat: no-repeat;
    background-size: auto 100%;
}

.bg-promo::before {
    left: 0;
    background-image: url(/images/all-access/aap-fall-leaves-left.svg);
    background-position: left top;
}

.bg-promo::after {
    right: 0;
    background-image: url(/images/all-access/aap-fall-leaves-right.svg);
    background-position: right top;
}

/* Below 1100px the leaf clusters sit behind the copy; fade them back so the text stays readable. */
@media (max-width: 1100px) {
    .bg-promo::before,
    .bg-promo::after {
        opacity: 0.45;
    }
}

/* ============ HP Banner: drifting leaves ============ */
/* promo-starfield.js fills this container with .promo-star elements holding a star character;
   the theme hides the character and paints a leaf in its place. */
.promo-starfield {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.promo-star {
    position: absolute;
    font-size: 0;
    line-height: 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    will-change: transform, opacity;
}

.promo-star-near {
    width: 30px;
    height: 30px;
    background-image: url(/images/all-access/aap-fall-leaf-maple.svg);
    animation: promo-drift-near 13s linear infinite;
}

.promo-star-mid {
    width: 22px;
    height: 22px;
    background-image: url(/images/all-access/aap-fall-leaf-oak.svg);
    animation: promo-drift-mid 20s linear infinite;
}

.promo-star-far {
    width: 14px;
    height: 14px;
    background-image: url(/images/all-access/aap-fall-leaf-gold.svg);
    animation: promo-drift-far 30s linear infinite;
}

@keyframes promo-drift-near {
    0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.95; }
    92%  { opacity: 0.95; }
    100% { transform: translate(120vw, 70px) rotate(540deg); opacity: 0; }
}

@keyframes promo-drift-mid {
    0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.7; }
    92%  { opacity: 0.7; }
    100% { transform: translate(120vw, 50px) rotate(-420deg); opacity: 0; }
}

@keyframes promo-drift-far {
    0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.5; }
    92%  { opacity: 0.5; }
    100% { transform: translate(120vw, 30px) rotate(300deg); opacity: 0; }
}

/* Content stacks above the decoration (pseudos at z-index 1, leaves at 10).
   `.container` needs position:relative explicit — Bootstrap doesn't set it. */
.bg-promo > .position-relative.overflow-hidden,
.bg-promo > .container {
    position: relative;
    z-index: 20;
}

@media (prefers-reduced-motion: reduce) {
    .promo-starfield { display: none; }
    .promo-star { animation: none; }
}

/* `cover` only when the Hello Bar is in horizontal layout (thin strip).
   Below the stacking breakpoint the container is tall and `cover` overstretches.
   AAP Landing's bg-promo has the .overflow-hidden class (stacks at md),
   site-wide's doesn't (stacks at lg). */
.hello-bar .bg-promo::before,
.hello-bar .bg-promo::after {
    width: clamp(150px, 30%, 400px);
}
@media (min-width: 768px) {
    .hello-bar .bg-promo.overflow-hidden::before,
    .hello-bar .bg-promo.overflow-hidden::after {
        background-size: cover;
        background-position-y: center;
    }
}
@media (min-width: 992px) {
    .hello-bar .bg-promo:not(.overflow-hidden)::before,
    .hello-bar .bg-promo:not(.overflow-hidden)::after {
        background-size: cover;
        background-position-y: center;
    }
}


/* ============ Typography ============ */
.sale-pretitle {
    font-size: clamp(40px, 8vw, 88px);
    font-family: 'Barlow', sans-serif;
    font-weight: 800;
    color: var(--fall-rust);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-shadow: 0 1px 2px rgba(74, 36, 18, 0.12);
    max-width:900px;
    margin:0 auto;
}

/* Two background gradients form the left + right rules; a maple leaf sits
   centered between them. */
.bg-promo .sale-pretitle::after {
    content: '';
    display: block;
    font-size: clamp(14px, 1.5vw, 20px);
    height: 1.3em;
    margin: 1.5em auto 1.25em;
    width: min(440px, 75%);
    background:
        url(/images/all-access/aap-fall-leaf-maple.svg) center / contain no-repeat,
        linear-gradient(to right, var(--fall-line), var(--fall-line)) left center / calc(50% - 22px) 2px no-repeat,
        linear-gradient(to right, var(--fall-line), var(--fall-line)) right center / calc(50% - 22px) 2px no-repeat;
}

.sale-title {
    font-size: clamp(20px, 3vw, 32px);
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--fall-brown);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.hello-bar .sale-title {
    margin: 0;
    font-size: clamp(14px, 1vw, 20px);
    text-transform: none;
    letter-spacing: 0;
    color: var(--fall-brown);
    text-shadow: none;
}

.hello-bar .sale-title span {
    font-size: 1.5em;
    font-family: 'Barlow', sans-serif;
    color: var(--fall-rust);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-right: 4px;
}

/* ============ CTA button ============ */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fall-rust);
    color: #ffffff;
    font-family: 'Barlow', sans-serif;
    font-size: clamp(15px, 1.1vw, 20px);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 36, 18, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    z-index: 4;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-2px);
    background: var(--fall-rust-dark);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(74, 36, 18, 0.35);
}

/* Markup still ships an arrow <img>; campaign design hides it. */
.button-arrow {
    display: none;
}

/* ============ Countdown ============ */
.countdown {
    z-index: 2;
}

.countdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    text-align: center;
}

.countdown li {
    background: transparent;
    color: var(--fall-brown);
    padding: 0.5em;
    border-radius: 8px;
    min-width: 100px;
    margin: 0 5px;
    font-size: 0.6em;
    text-transform: uppercase;
    position: relative;
}

.countdown li span {
    display: block;
    font-size: 5em;
    font-weight: 800;
    color: var(--fall-brown);
    font-family: 'Barlow', sans-serif;
    line-height: 1;
}

.countdown li:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 50%;
    transform: translateY(-50%);
    width: 21px;
    height: 21px;
    background: url(/images/all-access/aap-fall-leaf-gold.svg) center / contain no-repeat;
}

/* ============ Close button ============ */
/* z-index sits above the content wrapper (20), which holds the full-bar link. */
button[title="Close Ad"].clear-button {
    box-sizing: border-box;
    margin-left: 10px;
    font-weight: 600;
    color: var(--fall-brown);
    font-size: 20px;
    opacity: 0.7;
    text-align: right;
    display: inline-block;
    vertical-align: middle;
    line-height: .9;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    height: 40px;
    background: transparent;
    width: 40px;
    z-index: 30;
}

/* ============ AAP Landing Hello Bar overrides ============ */
#pnlHelloBarAAPromo .savings-hero {
    display: inline-flex;
    align-items: center;
    gap: 1em;
}

#pnlHelloBarAAPromo .savings-stack {
    display: inline-flex;
    flex-direction: column;
    text-align: center;
    line-height: 1;
}

/* The markup ships three star characters; the theme swaps them for three leaves. */
#pnlHelloBarAAPromo .savings-stars {
    font-size: 0;
    height: 15px;
    margin-bottom: 5px;
    background:
        url(/images/all-access/aap-fall-leaf-gold.svg) calc(50% - 20px) center / 15px 15px no-repeat,
        url(/images/all-access/aap-fall-leaf-maple.svg) center / 15px 15px no-repeat,
        url(/images/all-access/aap-fall-leaf-oak.svg) calc(50% + 20px) center / 15px 15px no-repeat;
}

#pnlHelloBarAAPromo .savings-eyebrow {
    font-family: 'Barlow', sans-serif;
    color: var(--fall-brown);
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1;
}

#pnlHelloBarAAPromo .savings-headline {
    font-family: 'Barlow', sans-serif;
    color: var(--fall-brown);
    font-size: 2em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-top: 1px;
}

#pnlHelloBarAAPromo .price-callout {
    font-family: 'Barlow', sans-serif;
    color: var(--fall-rust);
    font-size: 3.8em;
    font-weight: 800;
    line-height: 1;
}

/* Drop the price below the savings stack when the row gets too tight. */
@media (max-width: 380px) {
    #pnlHelloBarAAPromo .savings-hero {
        flex-direction: column;
        gap: 0.2em;
    }
}

/* Vertical divider between text and countdown — only when the Hello Bar is in
   horizontal layout, otherwise the left border lands on a stacked element. */
@media (min-width: 992px) {
    #divContentWrapper #pnlCountdownAAPromo {
        border-left: 2px solid var(--fall-line);
        padding-left: 20px;
    }
}
@media (min-width: 768px) {
    .d-md-flex #pnlCountdownAAPromo {
        border-left: 2px solid var(--fall-line);
        padding-left: 20px;
    }
}

#pnlHelloBarAAPromo .countdown::before {
    content: 'OFFER ENDS IN';
    display: block;
    text-align: center;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--fall-brown);
    margin-bottom: 4px;
    text-transform: uppercase;
}

#pnlHelloBarAAPromo .countdown ul {
    gap: 22px;
}

#pnlHelloBarAAPromo .countdown li {
    border-radius: 0;
    font-size: 0.5em;
    min-width: 0;
    box-shadow: none;
    padding: 0;
    color: var(--fall-brown);
    font-weight: 700;
    letter-spacing: 0.1em;
}

#pnlHelloBarAAPromo .countdown li span {
    display: block;
    font-size: 3.5em;
    margin: 0;
    color: var(--fall-brown);
    font-weight: 800;
    line-height: 1;
    font-family: 'Barlow', sans-serif;
}

#pnlHelloBarAAPromo .countdown li:not(:first-child)::before {
    content: ':';
    background: none;
    color: var(--fall-brown);
    left: -18px;
    top: 35%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    line-height: 1;
    font-size: 2.4em;
    font-weight: 800;
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .button-arrow {
        width: 30px;
        height: auto;
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .bg-promo .sale-pretitle::after {
        width: 90%;
    }
}

@media (max-width: 575.9px) {
    .countdown ul {
        gap: 5px;
    }

    .countdown li {
        min-width: 85px;
        font-size: 0.8em;
    }

    .countdown li span {
        font-size: 1.5em;
    }

    #pnlHelloBarAAPromo .countdown li {
        font-size: 0.4em;
    }
}

@media (max-width: 340px) {
    .button-arrow {
        display: none;
    }
}
