/* ─────────────────────────────────────────────────────────────────────────────
 * DopamineDriven.io — Too Many Tabs Open Newsletter Signup Block
 * Styles the footer newsletter section + homepage hero newsletter CTA.
 * ───────────────────────────────────────────────────────────────────────── */

/* ── Scroll offset — compensates for the 90px fixed nav ──────────────────── */

#dd-nl-footer {
  scroll-margin-top: 110px;
}

/* ── Footer newsletter banner ─────────────────────────────────────────────── */

.ddf-nl-section {
  border-top: 1px solid #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
  background: #0f0f0f;
  padding: 3rem 0;
}

.ddf-nl-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.ddf-nl-eyebrow {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #CCFF00;
  font-weight: 700;
  margin-bottom: .6rem;
  font-family: 'IBM Plex Mono', monospace;
}

.ddf-nl-headline {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 .75rem;
  letter-spacing: -.03em;
}

.ddf-nl-sub {
  color: #888;
  line-height: 1.65;
  font-size: .9375rem;
  margin: 0 0 .75rem;
  max-width: 380px;
}

.ddf-nl-meta {
  font-size: .7rem;
  color: #555;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .04em;
}

/* ── Form ──────────────────────────────────────────────────────────────────── */

.ddf-nl-form-wrap {
  position: relative;
}

.ddf-nl-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ddf-nl-row {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}

.ddf-nl-input {
  flex: 1;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 4px;
  font-size: .9375rem;
  font-family: inherit;
  transition: border-color .2s;
  outline: none;
  min-width: 0;
}
.ddf-nl-input:focus {
  border-color: #CCFF00;
}
.ddf-nl-input::placeholder { color: #444; }

.ddf-nl-btn {
  background: #CCFF00;
  color: #050505;
  border: none;
  padding: .75rem 1.5rem;
  border-radius: 4px;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .2s, transform .1s;
  flex-shrink: 0;
}
.ddf-nl-btn:hover { background: #b8e600; }
.ddf-nl-btn:active { transform: scale(.97); }
.ddf-nl-btn:disabled { background: #333; color: #666; cursor: not-allowed; }

/* ── Consent checkbox ─────────────────────────────────────────────────────── */

.ddf-nl-consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
}

.ddf-nl-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #333;
  border-radius: 3px;
  background: #0a0a0a;
  flex-shrink: 0;
  margin-top: .1em;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.ddf-nl-consent input[type="checkbox"]:checked {
  background: #CCFF00;
  border-color: #CCFF00;
}
.ddf-nl-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #050505;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.ddf-nl-consent input[type="checkbox"]:focus { outline: 2px solid rgba(204,255,0,.4); outline-offset: 2px; }

.ddf-nl-consent-text {
  font-size: .78rem;
  color: #666;
  line-height: 1.5;
}
.ddf-nl-consent-text a {
  color: #888;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Legal line ───────────────────────────────────────────────────────────── */

.ddf-nl-legal {
  font-size: .7rem;
  color: #444;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .03em;
  margin: 0;
}

/* ── States ───────────────────────────────────────────────────────────────── */

.ddf-nl-success,
.ddf-nl-error {
  display: none;
}
.ddf-nl-success.is-visible,
.ddf-nl-error.is-visible {
  display: block;
}

.ddf-nl-success {
  text-align: center;
  padding: 2rem 1.5rem;
}

.ddf-nl-success-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
}

.ddf-nl-success p {
  color: #aaa;
  line-height: 1.65;
  font-size: .9375rem;
  margin: 0;
}
.ddf-nl-success strong { color: #fff; }

.ddf-nl-error p {
  background: rgba(255,80,80,.08);
  border: 1px solid rgba(255,80,80,.25);
  border-radius: 4px;
  padding: .75rem 1rem;
  color: #FF7070;
  font-size: .875rem;
  margin: 0;
}

/* ── Homepage hero: newsletter feed card ──────────────────────────────────── */

.ddh-feed-card--newsletter {
  background: rgba(0, 212, 255, 0.04);
  border-left: 2px solid rgba(0, 212, 255, 0.55);
  box-shadow: inset 0 0 32px rgba(0, 212, 255, 0.04),
              0 0 0 1px rgba(0, 212, 255, 0.1);
  text-decoration: none;
}

.ddh-feed-card--newsletter:hover {
  background: rgba(0, 212, 255, 0.08);
  border-left-color: rgba(0, 212, 255, 0.9);
  box-shadow: inset 0 0 40px rgba(0, 212, 255, 0.07),
              0 0 0 1px rgba(0, 212, 255, 0.2),
              0 0 18px rgba(0, 212, 255, 0.08);
}

.ddh-feed-card-badge--nl {
  color: #00D4FF !important;
  background: rgba(0, 212, 255, 0.12) !important;
  border-color: rgba(0, 212, 255, 0.25) !important;
}

.ddh-feed-card--newsletter .ddh-feed-card-title {
  color: #e8f8ff;
  display: flex;
  align-items: center;
  gap: .45em;
}

.ddh-nl-card-icon {
  font-size: .95rem;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
  /* Render as plain white text — not emoji colour */
  font-family: Arial, sans-serif;
}

.ddh-feed-card-time--nl {
  /* Override the tiny 0.6rem mono — make it a proper CTA */
  font-family: var(--font-mono) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  color: #00D4FF !important;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 3px;
  padding: .3em .7em !important;
  letter-spacing: .05em;
  white-space: nowrap;
  text-transform: uppercase;
  align-self: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 800px) {
  .ddf-nl-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ddf-nl-sub { max-width: none; }
}

@media (max-width: 520px) {
  .ddf-nl-headline { font-size: 1.375rem; }
  .ddf-nl-row { flex-direction: column; }
  .ddf-nl-section { padding: 2rem 0; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ddf-nl-btn,
  .ddf-nl-input,
  .ddf-nl-consent input[type="checkbox"] { transition: none; }
}
