/*
 * Newsletter capture — one stylesheet for every placement on both brands.
 *
 * The component is brand-aware through two custom-property sets, so the
 * recipePro teal and the riverBI orange come from the same rules and a page
 * can never leak the other brand's colours.
 *
 * The layout is a two-column flex that collapses to one column, and every
 * control is at least 44px tall, so the form is usable at 390px wide.
 */

.rbi-nl {
  --rbi-nl-bg: #f5f7fa;
  --rbi-nl-text: #0f1d3b;
  --rbi-nl-muted: #4f5b73;
  --rbi-nl-border: #d5dce6;
  --rbi-nl-input-bg: #ffffff;
  --rbi-nl-input-text: #0f1d3b;
  --rbi-nl-cta-bg: #01c6ad;
  --rbi-nl-cta-bg-hover: #019a87;
  --rbi-nl-cta-text: #04202e;
  --rbi-nl-error: #b4232b;
  background: var(--rbi-nl-bg);
  color: var(--rbi-nl-text);
  padding: 48px 0;
}

.rbi-nl[data-brand="riverbi"] {
  --rbi-nl-text: #0b1730;
  --rbi-nl-muted: #4a5a70;
  --rbi-nl-cta-bg: #e39156;
  --rbi-nl-cta-bg-hover: #c9743c;
  --rbi-nl-cta-text: #241206;
}

/* The footer variant sits on the dark navy footer background. */
.rbi-nl--on-dark {
  --rbi-nl-bg: transparent;
  --rbi-nl-text: #ffffff;
  --rbi-nl-muted: #b9c8d8;
  --rbi-nl-border: #345878;
  --rbi-nl-input-bg: rgba(255, 255, 255, 0.06);
  --rbi-nl-input-text: #ffffff;
  --rbi-nl-error: #ffb4ab;
  padding: 32px 0 4px;
}

.rbi-nl--on-dark[data-brand="riverbi"] {
  --rbi-nl-text: #ffffff;
  --rbi-nl-muted: #b9c8d8;
}

.rbi-nl__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  align-items: center;
  justify-content: space-between;
}

.rbi-nl__copy {
  flex: 1 1 320px;
  min-width: 0;
}

.rbi-nl__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rbi-nl-cta-bg);
  margin: 0 0 0.4rem;
}

.rbi-nl__title {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.3;
  margin: 0 0 0.45rem;
  color: var(--rbi-nl-text);
  text-transform: none;
}

.rbi-nl__body {
  margin: 0;
  color: var(--rbi-nl-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.rbi-nl__form {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
}

.rbi-nl__label {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rbi-nl-text);
}

.rbi-nl__input {
  flex: 1 1 190px;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--rbi-nl-border);
  border-radius: 8px;
  background: var(--rbi-nl-input-bg);
  color: var(--rbi-nl-input-text);
  font-family: inherit;
  font-size: 1rem;
}

.rbi-nl__input:focus {
  outline: 2px solid var(--rbi-nl-cta-bg);
  outline-offset: 1px;
}

.rbi-nl__cta {
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--rbi-nl-cta-bg);
  color: var(--rbi-nl-cta-text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.rbi-nl__cta:hover {
  background: var(--rbi-nl-cta-bg-hover);
}

.rbi-nl__cta:focus-visible {
  outline: 3px solid var(--rbi-nl-text);
  outline-offset: 2px;
}

.rbi-nl__cta[disabled] {
  opacity: 0.6;
  cursor: default;
}

.rbi-nl__status {
  flex: 1 0 100%;
  margin: 2px 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--rbi-nl-text);
}

.rbi-nl__status[data-state="error"] {
  color: var(--rbi-nl-error);
}

.rbi-nl__fine {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--rbi-nl-muted);
}

.rbi-nl__fine a {
  color: inherit;
}

@media (max-width: 575px) {
  .rbi-nl {
    padding: 34px 0;
  }

  .rbi-nl__inner {
    gap: 18px;
  }

  .rbi-nl__input,
  .rbi-nl__cta {
    flex: 1 0 100%;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rbi-nl__cta {
    transition: none;
  }
}
