/* Niko's Miniatures — newsletter sign-up box, /newsletter/ page, and the admin Newsletter tab.
   Uses the colour variables from styles.css. */

.nl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nl-box[hidden] { display: none !important; }
.nl-form {
  display: grid;
  gap: 1rem 2rem;
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--bone-soft);
  text-align: left;
}
.nl-form--card { margin: 2.5rem auto 0; max-width: var(--narrow); padding: 1.5rem; }
.nl-title { margin: 0 0 0.35rem; font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; color: var(--bone); line-height: 1.2; }
.nl-lead { margin: 0; color: var(--bone-soft); font-size: 1rem; line-height: 1.5; }
.nl-fields { display: grid; gap: 0.8rem; }
.nl-row { display: flex; gap: 0.6rem; }
.nl-input {
  flex: 1 1 auto; min-width: 0; min-height: 3rem; padding: 0.6rem 0.9rem;
  font: inherit; font-size: 1rem; color: var(--bone);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
}
.nl-input::placeholder { color: var(--bone-dim); }
.nl-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nl-btn { min-height: 3rem; white-space: nowrap; }
.nl-consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.92rem; line-height: 1.45; color: var(--bone-soft); cursor: pointer; }
.nl-consent input { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin: 0.1rem 0 0; accent-color: var(--bone); }
.nl-consent a { color: var(--bone); text-decoration: underline; }
.nl-msg { margin: 0; min-height: 1.2em; font-size: 0.95rem; }
.nl-msg.is-error { color: var(--danger); }
.nl-msg.is-success { color: #afeac2; }
.nl-form.is-done .nl-row, .nl-form.is-done .nl-consent { display: none; }

/* Footer variant: full-width strip above the footer links (including the grouped footer) */
.nl-box--footer { flex: 1 1 100%; }
.site-footer__inner > [data-newsletter] {
  display: block;
  width: 100%;
  margin: 0 0 1.5rem;
}
.nl-form--footer { padding: 1rem 1.1rem; }
.nl-form--footer .nl-title { font-size: 1.2rem; }
.nl-form--footer .nl-lead { font-size: 0.95rem; }

@media (min-width: 760px) {
  .nl-form--footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; }
}
@media (max-width: 520px) {
  .nl-row { flex-direction: column; }
  .nl-btn { width: 100%; }
  .nl-form--card { padding: 1.1rem; margin-top: 1.75rem; }
}

/* /newsletter/ page */
.nl-page { padding: 2rem 0 3rem; }
.nl-page h1 { font-family: var(--font-display); font-weight: 400; }
.nl-result { padding: 1.4rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-card); }
.nl-result h2 { margin: 0 0 0.5rem; font-family: var(--font-display); font-weight: 400; }
.nl-result--success { border-color: #6cc98a; }
.nl-result--error { border-color: #c9736c; }
.nl-privacy { margin-top: 2rem; color: var(--bone-soft); line-height: 1.6; }
.nl-privacy h2 { font-family: var(--font-display); font-weight: 400; color: var(--bone); }

/* ---------- Admin: Newsletter tab ---------- */
.nl-admin { display: grid; gap: 1.2rem; }
.nl-admin .panel { margin: 0; }
.nl-status { padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--line-strong); line-height: 1.5; }
.nl-status strong { display: block; font-size: 1.05rem; }
.nl-status--off { border-color: #d6b668; background: rgba(214, 182, 104, 0.1); color: #f2dc9b; }
.nl-status--on { border-color: #6cc98a; background: rgba(108, 201, 138, 0.1); color: #afeac2; }
.nl-status ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.nl-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 0.9rem; }
.nl-count { padding: 0.7rem 0.5rem; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.nl-count b { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--bone); }
.nl-count span { font-size: 0.8rem; color: var(--bone-dim); }
.nl-tools { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.nl-tools .field { flex: 1 1 10rem; margin: 0; }
.nl-sub { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.nl-sub:first-child { border-top: 0; }
.nl-sub__who { min-width: 0; }
.nl-sub__email { display: block; overflow-wrap: anywhere; color: var(--bone); }
.nl-sub__meta { font-size: 0.82rem; color: var(--bone-dim); }
.nl-sub__act { display: flex; gap: 0.4rem; flex: 0 0 auto; }
.nl-help summary { cursor: pointer; padding: 0.4rem 0; color: var(--bone-soft); }
.nl-help pre { margin: 0.4rem 0 0; padding: 0.8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; font-size: 0.88rem; color: var(--bone-soft); }
.nl-editor-actions { display: grid; gap: 0.6rem; margin-top: 0.4rem; }
.nl-editor-actions .btn { width: 100%; min-height: 3rem; }
.nl-preview { margin-top: 0.9rem; }
.nl-preview iframe { width: 100%; height: 34rem; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; }
.nl-issue { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.nl-issue:first-of-type { border-top: 0; }
.nl-issue__head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: flex-start; }
.nl-issue__title { color: var(--bone); overflow-wrap: anywhere; }
.nl-issue__note { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--bone-soft); line-height: 1.45; }
.nl-issue .inline-actions { margin-top: 0.6rem; }
.nl-img-thumb { display: block; margin-top: 0.5rem; width: 9rem; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
@media (min-width: 700px) {
  .nl-editor-actions { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
  .nl-editor-actions .btn { width: auto; }
}
