/* ===================================
   Hero Offer block
   =================================== */

.hero-offer-block {
    position: relative !important;
    display: block;
    width: 100%;
    background-color: #001744;
    color: #ffffff;
}

/* Extra breathing room below the hero image on mobile, where the CTA is
   pinned near the bottom of .hero-offer-inner rather than flowing after
   the picture. Reset back to 0 on desktop (see the per-instance <style>
   block in hero-offer.php), where the layout doesn't need it. */
.hero-offer-block.hero-offer-has-bg {
    padding-bottom: 45px;
}

/*
 * The background picture is a normal, in-flow element: it sets the hero's
 * height itself (by its own aspect ratio, scaled to 100% width), so the
 * block is exactly as tall as the artwork at any viewport width. The
 * content overlay is then positioned absolutely *inside that same box*,
 * so it always lines up with the artwork instead of the artwork being
 * cropped (object-fit: cover) to fit a height the content decided.
 */
/*
 * Masked (not tinted) so the section's background-color shows through
 * where the image is hidden: fully visible at the top, fading out to
 * fully masked (hidden) by about 10% of the way down, so the rest of the
 * artwork stays untouched.
 */
.hero-offer-bg {
    display: block;
    line-height: 0;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 10%);
    mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
}

.hero-offer-bg-img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-offer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 72px 24px 0;
}

/*
 * With a background image present, the picture above defines the hero's
 * box and the content is overlaid inside it (mobile: simple padding,
 * matching the mobile-first sizing below). Without a background (e.g. the
 * block editor before an image is picked), the content stays in normal
 * flow so there's still something to see and edit.
 *
 * On desktop, the per-instance <style> block generated by hero-offer.php
 * switches this to an explicit top/left/width position (Content Top/Left/
 * Width fields, scaled from their Base Viewport Width) instead of this
 * padding + max-width — the same "base viewport width" proportional
 * positioning used by Reel Zappy's Hero Banner block.
 */
.hero-offer-has-bg .hero-offer-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Font size comes from the per-instance <style> block (hero-offer.php),
   scaled from the Top Text Font Size fields' Base Viewport Width. */
.hero-offer-top-text {
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1.12px;
    line-height: 1.2;
    font-style: italic;
}

.hero-offer-expired-text {
    color: #ff6b6b;
}

.hero-offer-value-cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/*
 * A CSS Grid with a single max-content column, rather than a flex row with
 * flex-wrap. The Bonus/Price lines below need to span the full line width
 * so their own text-align: center works, but a percentage/fit-content
 * width on a flex item is resolved against the *available* space in an
 * indefinite-width flex container (which here bubbles up to whatever
 * width .hero-offer-inner happens to have) rather than against the
 * *actual content* width of this box's siblings — that's what was
 * making .hero-offer-value-cta-group compute much wider than its content
 * (e.g. 803px instead of the ~635px the GC+SC row/CTA button actually
 * need). A grid track explicitly sized to max-content has no such
 * ambiguity: its size is always the widest real content contribution
 * (the GC+SC row below, or the CTA button), and percentage/stretched
 * children resolve against that afterward, not before.
 *
 * Font size comes from the per-instance <style> block, scaled from the
 * Value Font Size fields' Base Viewport Width.
 */
.hero-offer-value {
    display: grid;
    grid-template-columns: max-content;
    justify-items: center;
    row-gap: 0px;
    font-weight: 800;
}

.hero-offer-value-row {
    display: flex;
    align-items: center;
    column-gap: 12px;
}

.hero-offer-value-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height:1;
}

/* Width/height come from the per-instance <style> block, scaled from the
   Value Icon Size fields' Base Viewport Width. */
.hero-offer-value-icon {
    object-fit: contain;
}

.hero-offer-value-gc .hero-offer-value-text {
    background: linear-gradient(180deg, #FFD338 8.33%, #FCAF00 36.7%, #FFFF8B 103.53%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-offer-value-sc .hero-offer-value-text {
    background: linear-gradient(180deg, #579415 -13.89%, #7AED00 23.66%, #D5F91C 88.89%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-offer-value-plus {
    display: inline-flex;
    align-items: center;
    align-self: center;
    color: #FFF;
    text-align: center;
    font-family: Inter, sans-serif;
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.8px;
    text-transform: uppercase;
}

/* Font size comes from the per-instance <style> block, scaled from the
   Bonus/Price Text Font Size fields' Base Viewport Width. */
.hero-offer-value-bonus,
.hero-offer-value-price {
    display: block;
    width: 100%;
    color: var(--white, #FFF);
    text-align: center;
    font-family: Inter, sans-serif;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1.2px;
}
.hero-offer-value-bonus {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 12px;
    color:#FFCE00;
}
.hero-offer-value-bonus > em {
    color: #FFF;
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.8px;
    text-transform: uppercase;
}

/* Width, height, and font size come from the per-instance <style> block,
   scaled from the CTA Width/Height/Font Size fields' Base Viewport Width. */
.hero-offer-cta {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 645665px;
    background: linear-gradient(87deg, #FF7403 -31.83%, #FDC20E 108.42%);
    color: #FFF;
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
    font-family: Inter, sans-serif;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.hero-offer-cta:hover,
.hero-offer-cta:focus {
    filter: brightness(1.05);
    color: #FFF;
}

/* Font size comes from the per-instance <style> block, scaled from the
   Disclaimer Font Size fields' Base Viewport Width. */
.hero-offer-disclaimer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    margin: 0;
    padding: 0 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .hero-offer-disclaimer {
        padding: 0 48px;
    }
}

/* --- Editor-only affordances --- */

.hero-offer-disabled-notice {
    margin: 0 0 12px;
    padding: 12px 16px;
    border: 1px dashed #d63638;
    border-radius: 4px;
    background: #fcf0f1;
    color: #d63638;
    font-size: 13px;
}

.hero-offer-block-disabled {
    opacity: 0.5;
}

.hero-offer-placeholder,
.hero-offer-cta-empty,
.hero-offer-disclaimer-empty {
    padding: 10px 14px;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-style: italic;
}
