/*
 * Best Before · Newsletter sign-up component (template-parts/global/newsletter.php).
 * Enqueued lazily by bbt_newsletter() wherever it's included (home/footer/
 * account), not tied to a single page context - tokens only.
 */

.bb-newsletter { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding: clamp(20px, 3vw, 32px); border-radius: var(--bb-r-panel); background: var(--bb-ink); color: #fff; }
.bb-newsletter__copy { flex: 1 1 260px; min-width: 0; }
.bb-newsletter__heading { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--bb-yellow); font-size: 1.375rem; }
.bb-newsletter__heading svg { flex: none; }
.bb-newsletter__sub { margin: 0; color: rgba(255, 255, 255, .8); font-size: .9375rem; max-width: 48ch; }

.bb-newsletter__form { flex: 1 1 320px; min-width: 0; }
.bb-newsletter__row { display: flex; gap: 10px; }
.bb-newsletter__input { flex: 1 1 auto; min-width: 0; }
.bb-newsletter__input:focus { box-shadow: 0 0 0 3px rgba(255, 207, 2, .65); }
.bb-newsletter__submit { flex: none; white-space: nowrap; }

/* Honeypot: present in the DOM and tab-order-excluded, but with zero visual
   footprint so a bot filling "every field it can see" never finds it, while
   a screen-reader user never lands on it either (absolute off-canvas, not
   display:none, so it still "exists" to naive bots that only check
   visibility: hidden/display: none). */
.bb-newsletter__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bb-newsletter__consent { flex-basis: 100%; margin: 10px 0 0; font-size: .75rem; line-height: 1.5; color: rgba(255, 255, 255, .65); }
.bb-newsletter__consent a { color: rgba(255, 255, 255, .85); text-decoration: underline; }

.bb-newsletter__status { flex-basis: 100%; margin: 10px 0 0; padding: 10px 14px; border-radius: var(--bb-r-small); font-size: .875rem; font-weight: 600; }
.bb-newsletter__status[data-state="ok"] { background: var(--bb-success-bg); color: var(--bb-success); }
.bb-newsletter__status[data-state="error"] { background: #fdf1f0; color: var(--bb-error); }

.bb-newsletter--footer { background: #000; }
.bb-newsletter--compact { padding: 16px 20px; }
.bb-newsletter--compact .bb-newsletter__sub { display: none; }

@media (max-width: 600px) {
	.bb-newsletter__row { flex-direction: column; }
	.bb-newsletter__submit { width: 100%; }
}

/* ---------- 'button' variant: compact trigger (not the dialog) ---------- */
.bb-newsletter--button { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px clamp(16px, 3vw, 24px); background: var(--bb-ink); color: #fff; }
.bb-newsletter__teaser { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9375rem; color: rgba(255, 255, 255, .92); }
.bb-newsletter__teaser svg { flex: none; color: var(--bb-yellow); }
.bb-newsletter__trigger { flex: none; }

/* ---------- Dialog content (template-parts/global/newsletter.php, 'button' variant) ---------- */
.bb-newsletter-dialog .bb-dialog__title { display: flex; align-items: center; gap: 10px; }
.bb-newsletter-dialog .bb-dialog__title svg { flex: none; color: var(--bb-yellow); }
.bb-newsletter__benefits { display: grid; gap: 10px; margin: 0 0 22px; padding: 18px 20px; border-radius: var(--bb-r-tile); background: var(--bb-ground); list-style: none; }
.bb-newsletter__benefits li { position: relative; list-style: none; margin: 0; padding-left: 26px; font-size: .875rem; line-height: 1.5; color: var(--bb-body); }
.bb-newsletter__benefits li::before { content: "\2713"; position: absolute; left: 0; top: 1px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bb-yellow); color: var(--bb-ink); font-size: .6875rem; font-weight: 800; line-height: 18px; text-align: center; }
.bb-newsletter-dialog .bb-newsletter__row { margin-top: 4px; }
.bb-newsletter-dialog .bb-newsletter__consent { color: var(--bb-muted); }
.bb-newsletter-dialog .bb-newsletter__consent a { color: var(--bb-ink); }

@media (max-width: 480px) {
	.bb-newsletter--button { flex-direction: column; align-items: stretch; text-align: center; }
	.bb-newsletter__trigger { width: 100%; }
}

/* A generic dialog/list reset was zeroing the benefits panel's padding and margin;
   pin them with higher specificity so the panel always breathes. */
#bb-newsletter-dialog .bb-newsletter__benefits,
.bb-newsletter .bb-newsletter__benefits { margin: 0 0 24px; padding: 18px 20px 18px 18px; }
#bb-newsletter-dialog .bb-newsletter__benefits li,
.bb-newsletter .bb-newsletter__benefits li { padding-left: 28px; }
