/* Digital Escape Tools — Newsletter (privacy-first, matches det-* / page-*) */

.det-nl-block {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(255, 193, 7, 0.08), transparent),
    linear-gradient(165deg, rgba(47, 54, 61, 0.92), rgba(36, 41, 46, 0.88));
  padding: 22px 20px;
  margin: 24px 0;
}

.det-nl-block--footer {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.det-nl-block--inline {
  margin: 28px 0;
}

.det-nl-block__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa0a6;
}

.det-nl-block__eyebrow i {
  color: #e4f88a;
  margin-right: 6px;
}

.det-nl-block__title {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: #e6edf3;
  line-height: 1.25;
}

.det-nl-block__title--sm {
  font-size: 1.05rem;
}

.det-nl-block__lead {
  margin: 0 0 16px;
  color: #bdc1c6;
  line-height: 1.55;
  max-width: 58ch;
}

.det-nl-trust {
  margin: 14px 0 0;
  padding-left: 1.1rem;
  color: #9aa0a6;
  font-size: 13px;
}

.det-nl-trust li {
  margin-bottom: 6px;
}

/* Form */
.det-nl-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.det-nl-form__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #9aa0a6;
}

.det-nl-form__email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.det-nl-input {
  flex: 1 1 200px;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: #e6edf3;
  padding: 10px 12px;
  font-size: 14px;
}

.det-nl-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.35);
  border-color: rgba(255, 193, 7, 0.45);
}

.det-nl-btn {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e6edf3;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.det-nl-btn--primary {
  border-color: rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.12);
  color: #ffd35a;
}

.det-nl-btn--primary:hover:not(:disabled) {
  background: rgba(255, 193, 7, 0.2);
}

.det-nl-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.det-nl-form__hint,
.det-nl-footnote {
  margin: 8px 0 0;
  font-size: 12px;
  color: #9aa0a6;
}

.det-nl-footnote a {
  color: #8ab4f8;
}

/* Topics */
.det-nl-topics {
  margin: 14px 0;
  border: 0;
  padding: 0;
}

.det-nl-topics__legend {
  font-size: 13px;
  font-weight: 600;
  color: #bdc1c6;
  margin-bottom: 10px;
}

.det-nl-topics__grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.det-nl-topics--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.det-nl-topic {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.det-nl-topic--compact {
  padding: 6px 10px;
  font-size: 12px;
}

.det-nl-topic input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.det-nl-topic__box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  margin-top: 2px;
}

.det-nl-topic input:checked + .det-nl-topic__box {
  background: rgba(255, 193, 7, 0.25);
  border-color: rgba(255, 193, 7, 0.6);
  box-shadow: inset 0 0 0 2px #24292e;
}

.det-nl-topic__label {
  display: block;
  font-weight: 600;
  color: #e6edf3;
  font-size: 13px;
}

.det-nl-topic__desc {
  display: block;
  font-size: 12px;
  color: #9aa0a6;
  margin-top: 2px;
}

.det-nl-topic[data-urgent="1"] {
  border-color: rgba(255, 120, 100, 0.25);
}

.det-nl-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9aa0a6;
  cursor: pointer;
}

.det-nl-consent input {
  margin-top: 3px;
  flex-shrink: 0;
}

.det-nl-status {
  margin: 10px 0 0;
  font-size: 13px;
  min-height: 1.2em;
}

.det-nl-status--ok {
  color: #9fdf9f;
}

.det-nl-status--err {
  color: #ffb4b4;
}

/* Footer column */
.footer-newsletter {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}

@media (min-width: 1001px) {
  .footer-newsletter {
    grid-column: span 2;
  }
}

/* Sticky bar */
.det-nl-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, transparent, rgba(36, 41, 46, 0.98) 24%);
  pointer-events: none;
}

.det-nl-sticky__inner {
  pointer-events: auto;
  max-width: 920px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid #444d56;
  background: #2f363d;
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.det-nl-sticky__text {
  margin: 0 0 8px;
  font-size: 13px;
  color: #bdc1c6;
}

.det-nl-sticky__close {
  position: absolute;
  top: 6px;
  right: 10px;
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: #9aa0a6;
  cursor: pointer;
  padding: 8px;
  z-index: 1;
}

.det-nl-form--sticky .det-nl-form__email-row {
  flex-wrap: nowrap;
}

/* Desktop-only: preserve sticky inline row (unchanged above 768px) */
@media (min-width: 769px) {
  .det-nl-form--sticky .det-nl-form__email-row {
    flex-direction: row;
    flex-wrap: nowrap;
  }
}

/* Exit intent */
.det-nl-exit[hidden] {
  display: none !important;
}

.det-nl-exit {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.det-nl-exit__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.det-nl-exit__panel {
  position: relative;
  width: min(480px, 100%);
  border-radius: 14px;
  border: 1px solid #444d56;
  background: #2f363d;
  padding: 22px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  animation: det-nl-fade-in 0.22s ease;
}

@keyframes det-nl-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.det-nl-exit__close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #9aa0a6;
  cursor: pointer;
  padding: 8px;
}

.det-nl-exit__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #e6edf3;
}

.det-nl-exit__lead {
  margin: 0 0 14px;
  color: #bdc1c6;
  font-size: 14px;
  line-height: 1.5;
}

body.det-nl-exit-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .det-nl-exit__panel {
    animation: none;
  }
  .det-nl-sticky {
    display: none !important;
  }
}

/* Privacy FAQ */
.det-nl-faq__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.det-nl-faq__item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  padding: 0 14px;
}

.det-nl-faq__q {
  cursor: pointer;
  font-weight: 600;
  color: #e6edf3;
  padding: 12px 0;
  list-style: none;
}

.det-nl-faq__q::-webkit-details-marker {
  display: none;
}

.det-nl-faq__a {
  margin: 0 0 14px;
  font-size: 14px;
  color: #bdc1c6;
  line-height: 1.55;
}

.det-nl-topics__grid--account {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.det-nl-form__hp label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Ensure email fields stay single-line inputs (never textarea-sized) */
.det-nl-form input.det-nl-input[type="email"] {
  display: block;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  line-height: 1.25;
}

/* ---------- Mobile: exit modal, sticky bar, footer, inline (desktop unchanged) ---------- */
@media (max-width: 768px) {
  .det-nl-exit {
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0)) 12px max(12px, env(safe-area-inset-bottom, 0));
  }

  .det-nl-exit__panel {
    width: 100%;
    max-width: 100%;
    max-height: min(90dvh, calc(100dvh - 24px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px 18px;
    margin: 0;
  }

  .det-nl-exit .det-nl-block {
    margin: 0;
    padding: 14px 12px;
  }

  .det-nl-exit .det-nl-block__title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .det-nl-exit .det-nl-block__lead {
    margin-bottom: 12px;
    font-size: 14px;
  }

  .det-nl-exit__title {
    font-size: 1.1rem;
    padding-right: 36px;
  }

  .det-nl-exit__lead {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .det-nl-form__row {
    margin-bottom: 4px;
  }

  .det-nl-form__email-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .det-nl-input,
  .det-nl-form input.det-nl-input[type="email"] {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
  }

  .det-nl-form__email-row .det-nl-btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .det-nl-consent {
    gap: 12px;
    align-items: flex-start;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.5;
  }

  .det-nl-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #e4f88a;
  }

  .det-nl-consent span {
    flex: 1;
    min-width: 0;
  }

  .det-nl-topics__grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .det-nl-topics {
    margin: 12px 0;
  }

  .det-nl-form__hint,
  .det-nl-footnote {
    margin-top: 10px;
    line-height: 1.45;
  }

  .det-nl-sticky__inner {
    max-height: min(85dvh, calc(100dvh - 80px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .det-nl-form--sticky .det-nl-form__email-row {
    flex-direction: column;
  }

  .det-nl-block:not(.det-nl-block--footer) {
    padding: 18px 14px;
    margin: 16px 0;
  }
}

@media (max-width: 480px) {
  .det-nl-exit {
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0));
  }

  .det-nl-exit__panel {
    max-height: min(92dvh, calc(100dvh - 16px));
    padding: 14px 12px 16px;
    border-radius: 12px;
  }

  .det-nl-exit .det-nl-block {
    padding: 12px 10px;
  }

  .det-nl-exit .det-nl-block__eyebrow {
    font-size: 11px;
  }

  .det-nl-exit .det-nl-block__title {
    font-size: 1.05rem;
  }

  .det-nl-input,
  .det-nl-form input.det-nl-input[type="email"] {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
  }

  .det-nl-form__email-row .det-nl-btn {
    min-height: 52px;
  }

  .det-nl-consent {
    font-size: 12px;
    gap: 10px;
  }

  .det-nl-topic {
    padding: 8px 10px;
  }

  .det-nl-sticky {
    padding-left: 8px;
    padding-right: 8px;
  }
}
