/**
 * Neo Compounds — quiet promo lines (issue #3, Welcome Friend Cash).
 * Enqueued only for signed-out visitors while the neo-credit Welcome promo is active.
 * Generic class names (.neo-promo-line) so a later "storewide sale" line can reuse them.
 * No animation, no boxes over content; WCAG AA contrast on each background.
 */

/* ── Shared ─────────────────────────────────────────────── */
.neo-promo-line {
  margin: 0;
  font-family: var(--neo-font, system-ui, sans-serif);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Small diamond accent (rotated square), decorative only. */
.neo-promo-line__mark {
  flex: 0 0 auto;
  display: inline-block;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--neo-green, #9BD84A);
}

/* ── a. Home hero, under "Shop All Compounds" (navy background) ── */
.neo-promo-line--hero {
  margin-top: 22px;
}

.neo-promo-line--hero .neo-promo-line__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px; /* tap target */
  max-width: 100%;
  color: var(--neo-on-dark, #E8EEF7); /* ~14:1 on navy */
  /* NC-153: larger CTA under the hero; 16px on phones, 18px by 1440. Colors unchanged. */
  font-size: clamp(16px, 0.35vw + 15px, 18px);
  font-weight: 700;
  text-decoration: none;
}

.neo-promo-line--hero .neo-promo-line__text {
  min-width: 0; /* let the text wrap inside the flex link on phones */
  white-space: normal;
  text-decoration: underline;
  text-decoration-color: rgba(155, 216, 74, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.neo-promo-line--hero .neo-promo-line__arrow {
  color: var(--neo-green, #9BD84A);
}

/* 0.5.71: arrow sits inside the text, glued to the last word. inline-block keeps the underline off the arrow. */
.neo-promo-line--hero .neo-promo-line__nowrap {
  white-space: nowrap;
}

.neo-promo-line--hero .neo-promo-line__text .neo-promo-line__arrow {
  display: inline-block;
  margin-left: 10px;
  text-decoration: none;
}

.neo-promo-line--hero .neo-promo-line__link:hover,
.neo-promo-line--hero .neo-promo-line__link:focus-visible {
  color: #fff;
}

.neo-promo-line--hero .neo-promo-line__link:hover .neo-promo-line__text,
.neo-promo-line--hero .neo-promo-line__link:focus-visible .neo-promo-line__text {
  text-decoration-color: var(--neo-green, #9BD84A);
}

.neo-promo-line--hero .neo-promo-line__link:focus-visible {
  outline: 2px solid var(--neo-green, #9BD84A);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .neo-promo-line--hero {
    margin-top: 12px;
  }

  .neo-promo-line--hero .neo-promo-line__link {
    gap: 8px;
    align-items: flex-start;
    padding: 8px 0;
  }

  .neo-promo-line--hero .neo-promo-line__mark {
    margin-top: 6px; /* align with first text line */
  }
}

/* ── b. Side-cart drawer footer (light --neo-bg background) ── */
.neo-promo-line--drawer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: -4px;
  font-size: 13px;
  color: var(--neo-body, #2A3A52); /* ~10:1 on #F5F7FA */
}

.neo-promo-line--drawer .neo-promo-line__mark {
  width: 6px;
  height: 6px;
  background: var(--neo-green-dark, #2F5A0B);
  transform: translateY(-2px) rotate(45deg);
}

.neo-promo-line__more {
  color: var(--neo-blue, #1E5BD8); /* ~5.7:1 on #F5F7FA */
  font-weight: 600;
  white-space: nowrap;
  text-underline-offset: 3px;
}

.neo-promo-line__more:hover {
  color: var(--neo-navy, #0B1A30);
}

/* ── c. Create account tab: neo-credit's fine print as a soft callout (CSS only) ──
   Markup (plugin): <p class="neo-fon-fine" data-neo-fon-fine><span data-neo-fon-fine-text>…</span> <a class="neo-fon-fine__link">…</a></p>
   The plugin's JS rewrites the span text after a referral code; the layout below doesn't depend on the text. */
p.neo-fon-fine[data-neo-fon-fine] {
  position: relative;
  margin: 14px 0 0;
  padding: 12px 14px 12px 44px;
  background: var(--neo-green-pale, #EAF6DA);
  border: 1px solid rgba(47, 90, 11, 0.18);
  border-radius: var(--neo-radius-input, 14px);
  color: var(--neo-ink, #0B1A30); /* ~16:1 on #EAF6DA */
  font-size: var(--neo-fine-size, 13px);
  line-height: 1.5;
}

/* Keep the plugin's own "hidden" behavior (promo off, no code). */
p.neo-fon-fine[data-neo-fon-fine][hidden] {
  display: none;
}

/* Small gift icon (inline SVG data URI, no request). */
p.neo-fon-fine[data-neo-fon-fine]::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 20px;
  height: 20px;
  background: no-repeat center / 20px 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232F5A0B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='14' height='9' rx='1.5'/%3E%3Cpath d='M2 5.5h16V8H2zM10 5.5V17M10 5.5C8.6 3 5.8 2.6 5.8 4.3 5.8 5.5 10 5.5 10 5.5zM10 5.5c1.4-2.5 4.2-2.9 4.2-1.2 0 1.2-4.2 1.2-4.2 1.2z'/%3E%3C/svg%3E");
}

/* CSS can't bold only the amount inside the plugin's text, so the whole sentence gets a little weight. */
p.neo-fon-fine[data-neo-fon-fine] [data-neo-fon-fine-text] {
  font-weight: 600;
}

p.neo-fon-fine[data-neo-fon-fine] .neo-fon-fine__link {
  color: var(--neo-blue, #1E5BD8); /* ~5.3:1 on #EAF6DA */
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .neo-promo-line *,
  p.neo-fon-fine[data-neo-fon-fine] * {
    transition: none !important;
  }
}
