/*
 * Newsletter band — homepage.json newsletterBand: full-bleed photo above, centered form below
 * on --neutrali bg. Underline-style email input per PLAN §2.3 (no boxed .input here).
 */
.pv-newsletter {
    background: var(--neutrali);
}

.pv-newsletter__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1731 / 720;
    object-fit: cover;
}

.pv-newsletter__content {
    max-width: 751px;
    /* Figma 2134:2267: the 285px content block is centered in the 525px newsletter region →
       (525-285)/2 = 120px of breathing room top + bottom. */
    padding-block: 120px;
    text-align: center;
}

.pv-newsletter__eyebrow {
    font-style: italic;
    font-weight: 600;
    /* 2291:6385: 16/20.48, tracking 0.8. The line-height was inheriting the body's 1.5 (24px),
       which padded the block and pushed the heading down. */
    font-size: 16px;
    line-height: 20.48px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.pv-newsletter__heading {
    /* 2291:6385/6386: 24px of INK between the eyebrow's baseline (y768) and the heading's cap top
       (y792). The two line boxes contribute ~20px of their own leading, so the margin is the
       remainder — a 16px margin measured 36px of ink. */
    margin-top: 5.5px;
    color: var(--ryski-raudona);
    font-size: clamp(32px, 4vw, 56px);
    /* 2291:6386 character runs: "GERIAUSI" is Aktiv Grotesk LIGHT 300 upright — only the em word
       carries weight. 56/71.68, tracking 2.8. */
    font-weight: 300;
    line-height: 1.28;
    letter-spacing: 2.8px;
    text-transform: uppercase;
}

/* "PASIŪLYMAI" run: Medium Italic 500 — not the 700 the band launched with. */
.pv-newsletter__heading em,
.pv-newsletter__heading i {
    font-style: italic;
    font-weight: 500;
}

.pv-newsletter__divider {
    width: 64px;
    margin: var(--space-4) auto;
    border: none;
    border-top: 1px solid var(--juoda);
}

.pv-newsletter__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Figma: heading box-bottom (6242.7) → email input (~6262) ≈ 20px. */
    margin-top: var(--space-4);
    gap: var(--space-3);
}

/* Figma: consent → PRENUMERUOTI button = ~34px (larger than the input→consent gap). */
.pv-newsletter__submit {
    margin-top: var(--space-2);
}

.pv-newsletter__input {
    width: 100%;
    max-width: none;
    padding: var(--space-2) 0;
    border: none;
    border-bottom: 1px solid var(--sub-pilka);
    background: none;
    text-align: center;
}

/* The sitewide :focus-visible ring (2px --ryski-raudona) drew a red rectangle around a field that
   has no box — it read as an error. Focus must still be VISIBLE for keyboard users, so the cue moves
   onto the rule the field actually has: it thickens and goes dark. */
.pv-newsletter__input:focus-visible {
    outline: none;
    border-bottom-width: 2px;
    border-bottom-color: var(--juoda);
    padding-bottom: calc(var(--space-2) - 1px);
}

.pv-newsletter__input::placeholder {
    color: var(--sub-pilka);
}

/* Consent row: the label carries the box only, the blurb sits beside it (client note #21). */
.pv-newsletter__consent {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
}

.pv-newsletter__checkbox {
    display: flex;
    align-items: center;
}

/* Custom consent checkbox — Figma: ~20px rounded square, --neutrali-pilka fill, subtle border */
.pv-newsletter__checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 8px;
    /* Component 69 (2291:6393): white fill, 1px --neutrali-pilka #f0ebe9 ring — the white keeps
       the box visible on the band; the ring is deliberately faint. */
    background: var(--balta);
    border: 1px solid var(--neutrali-pilka);
    cursor: pointer;
}

/* Checked state — Figma "Component 69" (2623:5225): the 20x20 r8 box fills --juoda and carries a
   white 9x6 1px tick inset at 6,7 (Design-QA y≈6320). */
.pv-newsletter__checkbox input[type="checkbox"]:checked {
    background-color: var(--juoda);
    border-color: var(--juoda);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 10.2l3 2.8 6-6' fill='none' stroke='white' stroke-width='1'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}

.pv-newsletter__privacy-link {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .pv-newsletter__photo img {
        height: 240px;
    }

    /* Same clamp-floor undershoot as the home headings: the 360px frame draws "GERIAUSI
       PASIŪLYMAI" at a 60px cap height @2x, which the 32px floor renders at 45. */
    .pv-newsletter__heading {
        font-size: 44px;
        line-height: 1.05;
        letter-spacing: 1px;
    }

    /* Pagrindinis 360px (2431:3756): the band bottom (4456) is 40px above the eyebrow cap (4496),
       and the PRENUMERUOTI button bottom (4819) is 64px above the footer (4883) — the desktop
       band's 120/120 left far too much air on a phone. Top is 40 minus the eyebrow's own leading
       above its cap. */
    .pv-newsletter__content {
        padding-top: 35.6px;
        padding-bottom: 64px;
    }
}

/* Signup reply (newsletter_controller). SUCCESS is the comp's green pill shown IN PLACE OF the
   submit button; an ERROR stays a quiet line under it, because a mistyped address must not be
   dressed up in the same confirmation shape. Both fade in, hold, fade out. */
.pv-newsletter__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    /* Figma 2733:5424 (the PRENUMERUOTI label this pill replaces): Aktiv Grotesk Regular, 400,
       14px, letter-spacing 0.7, line-height 17.92, fill #1e1e1e. Every button label in this frame
       is Regular — the 600 here was mine, not the design's. */
    font-size: 14px;
    line-height: 17.92px;
    font-weight: 400;
    letter-spacing: .7px;
    color: var(--juoda);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .35s ease, transform .35s cubic-bezier(.22, .61, .36, 1);
}

/* display:flex above outranks the UA's [hidden] rule — the same trap as the payment pending page. */
.pv-newsletter__status[hidden] {
    display: none;
}

.pv-newsletter__status.is-in {
    opacity: 1;
    transform: none;
}

/* Figma 2733:5112 "Frame 10": 298x50, cornerRadius 40, fill #07c881 — the same green the tokens
   already carry as --taskas-online, NOT --sekmes-zalia (#2ec27e), which is what looked too flat. */
.pv-newsletter__status--success {
    min-height: 50px;
    min-width: 298px;
    padding: 0 var(--space-5);
    border-radius: 40px;
    background: var(--taskas-online);
    text-transform: uppercase;
}

/* Comp: a DARK disc carrying a white tick, not a green one — it has to read on the green fill. */
.pv-newsletter__status--success::before {
    content: '';
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    background: var(--juoda) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.8 10.3l2.9 2.9 5.6-5.9' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 20px no-repeat;
}

.pv-newsletter__status--error {
    margin-top: var(--space-3);
    color: var(--ryski-raudona-shade);
}

.pv-newsletter__status--error::before {
    content: '';
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 50%;
    background: var(--ryski-raudona-shade) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 5.5v6M10 14.2v.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/></svg>") center / 18px no-repeat;
}

/* While the request is in flight the button reads as pressed, not broken. */
.pv-newsletter__form.is-busy .pv-newsletter__submit {
    opacity: .6;
    pointer-events: none;
}
