/* ============================================================
   popup.css — nyhedsbrevsfanen «Os med ældre tage»
   Fane nederst i højre hjørne, der folder sig ud til en boks.
   Markup: includes/popup-fane.php · adfærd: js/popup.js
   ============================================================ */

.ntp {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 300;            /* over indhold, under nav (200) er ikke nok: fanen skal kunne nås */
  font-family: 'Inter', sans-serif;
}

.ntp[hidden] { display: none; }

/* ── FANEN ── */
.ntp-tab {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 1.25rem 1.25rem 0;
  padding: .8rem 1.15rem;
  border: 0;
  border-radius: 10px 10px 0 10px;
  background: var(--orange, #E8761A);
  color: #fff;
  font: 600 .95rem/1.1 'Inter', sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(30, 45, 58, .28);
  transition: transform .15s ease, background .15s ease;
}

.ntp-tab:hover  { background: var(--orange-btn, #d4691a); transform: translateY(-2px); }
.ntp-tab:focus-visible { outline: 3px solid #1e2d3a; outline-offset: 2px; }

.ntp-tab-ikon { width: 20px; height: 20px; flex: 0 0 auto; }

/* Fanen skjules, mens boksen er åben. Ellers ligger de to oven i hinanden. */
.ntp.er-aaben .ntp-tab { display: none; }

/* ── BOKSEN ── */
.ntp-panel {
  position: relative;
  width: min(360px, calc(100vw - 2rem));
  margin: 0 1rem 1rem 0;
  padding: 1.5rem 1.4rem 1.2rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(30, 45, 58, .3);
  animation: ntp-ind .18s ease-out;
}

.ntp-panel[hidden] { display: none; }

@keyframes ntp-ind {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ntp-panel { animation: none; }
  .ntp-tab:hover { transform: none; }
}

.ntp-luk {
  position: absolute;
  top: .55rem;
  right: .55rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7c8a;
  cursor: pointer;
}

.ntp-luk svg { width: 18px; height: 18px; }
.ntp-luk:hover { background: #f1f3f5; color: #1e2d3a; }

.ntp-overskrift {
  margin: 0 0 .45rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-deeper, #1e2d3a);
  letter-spacing: -.01em;
}

.ntp-broedtekst {
  margin: 0 0 .9rem;
  font-size: .92rem;
  line-height: 1.5;
  color: #4a5a67;
}

.ntp-praemie {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 0 0 1.1rem;
  padding: .7rem .8rem;
  border-radius: 10px;
  background: #fdf2e7;
  color: #8a4a12;
  font-size: .85rem;
  line-height: 1.45;
}

.ntp-praemie svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--orange, #E8761A); }

/* ── FORMULAR ── */
.ntp-felt { display: block; margin-bottom: .7rem; }

.ntp-felt > span {
  display: block;
  margin-bottom: .25rem;
  font-size: .78rem;
  font-weight: 600;
  color: #4a5a67;
}

.ntp-felt em { color: var(--orange, #E8761A); font-style: normal; }

.ntp-felt input {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid #d7dde2;
  border-radius: 8px;
  font: 400 .95rem 'Inter', sans-serif;
  color: #1a1a1a;
  background: #fff;
}

.ntp-felt input:focus {
  outline: 0;
  border-color: var(--orange, #E8761A);
  box-shadow: 0 0 0 3px rgba(232, 118, 26, .18);
}

.ntp-felt input.fejl { border-color: #c0392b; }

/* Honeypot: væk for mennesker, men ikke display:none, som nogle bots tjekker for. */
.ntp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ntp-samtykke {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: .3rem 0 .9rem;
  font-size: .78rem;
  line-height: 1.45;
  color: #55636e;
  cursor: pointer;
}

.ntp-samtykke input {
  flex: 0 0 auto;
  margin-top: .15rem;
  width: 16px;
  height: 16px;
  accent-color: var(--orange, #E8761A);
}

.ntp-knap {
  width: 100%;
  padding: .8rem 1rem;
  border: 0;
  border-radius: 9px;
  background: var(--orange, #E8761A);
  color: #fff;
  font: 700 1rem 'Inter', sans-serif;
  cursor: pointer;
  transition: background .15s ease;
}

.ntp-knap:hover:not(:disabled) { background: var(--orange-btn, #d4691a); }
.ntp-knap:disabled { opacity: .6; cursor: default; }

.ntp-svar {
  margin: .7rem 0 0;
  font-size: .85rem;
  line-height: 1.45;
  color: #c0392b;
}

.ntp-svar.ok { color: #1e7a4a; }
.ntp-svar:empty { display: none; }

.ntp-smaat {
  margin: .8rem 0 0;
  font-size: .72rem;
  color: #8a97a1;
  text-align: center;
}

.ntp-smaat a { color: #6b7c8a; text-decoration: underline; }

/* Kvitteringen erstatter formularen, så boksen ikke bare bliver tom. */
.ntp-tak {
  margin: .4rem 0 0;
  padding: .9rem 1rem;
  border-radius: 10px;
  background: #eaf6ef;
  color: #1e7a4a;
  font-size: .92rem;
  line-height: 1.5;
}

/* ── MOBIL: boksen lægger sig som en bundplade ── */
@media (max-width: 480px) {
  .ntp-panel {
    width: 100vw;
    margin: 0;
    border-radius: 14px 14px 0 0;
    padding: 1.4rem 1.15rem 1.1rem;
  }

  .ntp-tab {
    margin: 0 .8rem .8rem 0;
    padding: .7rem 1rem;
    font-size: .88rem;
  }
}
