/* Newsletter banner – styl dopasowany do printshape.se (Poppins, niebieski przycisk, ramka z akcentem) */
.nlb[hidden] { display: none !important; }

.nlb {
  --nlb-btn: #1a73d9;
  --nlb-title: #333;
  --nlb-hl: #b8651b;
  --nlb-hl-bg: #fdf2e4;
  --nlb-text: #1f1f1f;
  --nlb-muted: #6b6f76;
  --nlb-border: #e3e5e8;
  font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
  color: var(--nlb-text);
  position: fixed;
  z-index: 10050;
  line-height: 1.5;
}
.nlb *, .nlb *::before, .nlb *::after { box-sizing: border-box; }

/* ---------- Pozycja: modal ---------- */
.nlb--modal { inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.nlb__overlay {
  position: absolute; inset: 0;
  background: rgba(20, 24, 31, .55);
  opacity: 0; transition: opacity .3s ease;
}
.nlb--modal.is-open .nlb__overlay { opacity: 1; }

.nlb__box {
  position: relative;
  background: #fff;
  border: 1px solid var(--nlb-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  display: flex;
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .3s ease, transform .3s ease;
}
.nlb.is-open .nlb__box { opacity: 1; transform: none; }

/* ---------- Pozycja: róg ---------- */
.nlb--corner { right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px); }
.nlb--corner .nlb__box { flex-direction: column; max-height: calc(100vh - 40px); }
.nlb--corner .nlb__media { flex: none; max-height: 190px; }
.nlb--corner .nlb__content { padding: 22px 22px 18px; }
.nlb--corner .nlb__title { font-size: 21px; }
.nlb--corner .nlb__row { flex-direction: column; }

/* ---------- Grafika ---------- */
.nlb__media { flex: 0 0 42%; min-width: 0; background: #f6f7f8; overflow: hidden; }
.nlb__media a { display: block; height: 100%; }
.nlb__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Układ: tylko własny baner */
.nlb--image .nlb__box { max-width: 720px; width: auto; }
.nlb--image .nlb__media { flex: 1 1 auto; background: none; }
.nlb--image .nlb__media img { height: auto; max-height: calc(100vh - 34px); object-fit: contain; }
.nlb--corner.nlb--image .nlb__media { max-height: none; }

/* ---------- Treść ---------- */
.nlb__content { flex: 1 1 auto; min-width: 0; padding: 40px 36px 30px; display: flex; flex-direction: column; justify-content: center; }

.nlb__title {
  margin: 0 32px 16px 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--nlb-title);
}

.nlb__hl {
  background: var(--nlb-hl-bg);
  border-left: 4px solid var(--nlb-hl);
  padding: 12px 16px;
  margin: 0 0 18px;
  border-radius: 0 4px 4px 0;
}
.nlb__hl strong { display: block; color: var(--nlb-hl); font-weight: 600; font-size: 14px; filter: brightness(.82); }
.nlb__hl span { display: block; color: var(--nlb-hl); font-size: 13px; margin-top: 4px; }

.nlb__text { font-size: 14px; color: var(--nlb-text); padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px dashed #c9ccd1; }
.nlb__text p { margin: 0 0 8px; }
.nlb__text p:last-child { margin-bottom: 0; }

/* ---------- Formularz ---------- */
.nlb__row { display: flex; gap: 10px; }
.nlb__input {
  flex: 1 1 auto; min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--nlb-border);
  border-radius: 0;
  background: #fff;
  font: inherit; font-size: 14px; color: var(--nlb-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  transition: border-color .2s, box-shadow .2s;
}
.nlb__input:focus { outline: none; border-color: var(--nlb-btn); box-shadow: 0 0 0 3px rgba(26, 115, 217, .15); }
.nlb__input.is-invalid { border-color: #d32f2f; }

.nlb__btn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px;
  padding: 0 26px;
  border: 0; border-radius: 0;
  background: var(--nlb-btn);
  color: #fff;
  font: inherit; font-size: 14px; font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
  transition: filter .2s, transform .1s, box-shadow .2s;
}
.nlb__btn:hover { filter: brightness(.92); box-shadow: 0 6px 14px rgba(0, 0, 0, .22); }
.nlb__btn:active { transform: translateY(1px); }
.nlb__btn[disabled] { opacity: .65; cursor: wait; }

.nlb__consent { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; cursor: pointer; font-size: 12px; color: var(--nlb-muted); font-weight: 400; line-height: 1.45; }
.nlb__consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nlb__check {
  flex: none; width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid #1f2a44; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.nlb__consent input:checked + .nlb__check::after {
  content: ""; width: 9px; height: 5px;
  border-left: 2px solid var(--nlb-btn); border-bottom: 2px solid var(--nlb-btn);
  transform: rotate(-45deg) translate(1px, -1px);
}
.nlb__consent input:focus-visible + .nlb__check { box-shadow: 0 0 0 3px rgba(26, 115, 217, .25); }
.nlb__consent.is-invalid .nlb__check { border-color: #d32f2f; }
.nlb__consent-text p { margin: 0; }
.nlb__consent-text a { color: inherit; text-decoration: underline; }

.nlb__msg { margin: 12px 0 0; font-size: 13px; min-height: 0; }
.nlb__msg:empty { display: none; }
.nlb__msg.is-ok { color: #1b7a3a; font-weight: 500; }
.nlb__msg.is-err { color: #c62828; }

.nlb__form.is-done .nlb__row,
.nlb__form.is-done .nlb__consent { display: none; }
.nlb__form.is-done .nlb__msg {
  margin: 0; padding: 14px 16px;
  background: #eef8f1; border-left: 4px solid #1b7a3a;
}

.nlb__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Zamknij (X) ---------- */
.nlb__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--nlb-border); border-radius: 50%;
  background: #fff; color: #333;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  transition: color .2s, border-color .2s, transform .2s;
}
.nlb__close:hover { color: var(--nlb-btn); border-color: var(--nlb-btn); transform: rotate(90deg); }

html.nlb-lock, html.nlb-lock body { overflow: hidden !important; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .nlb--modal { align-items: flex-end; padding: 0; }
  .nlb--modal .nlb__box { flex-direction: column; max-height: 92vh; border-left: 0; border-right: 0; border-bottom: 0; }
  .nlb--modal .nlb__media { flex: none; max-height: 170px; }
  .nlb--modal.nlb--image .nlb__box { align-self: center; margin: 16px; width: calc(100% - 32px); }
  .nlb--modal.nlb--image .nlb__media { max-height: none; }
  .nlb__content { padding: 24px 18px 20px; }
  .nlb__title { font-size: 22px; }
  .nlb__row { flex-direction: column; }
  .nlb__btn { width: 100%; }
  .nlb--corner { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .nlb__box, .nlb__overlay, .nlb__close { transition: none; }
}
