/* =========================================================
   ZOXTEAM — popup newslettera
   Uwaga: style.css ma globalne reguły `button` i `a` z !important,
   dlatego elementy popupu przebijają je wyższą specyficznością.
   ========================================================= */

.zx-nl[hidden] {
  display: none !important;
}

.zx-nl {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.zx-nl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 28, 61, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.zx-nl-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background-color: var(--zx-white);
  border-radius: 20px;
  padding: 2.25rem 2rem 1.75rem;
  box-shadow: 0 24px 60px rgba(76, 63, 199, 0.3);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
/* pasek w kolorach marki na górze okna */
.zx-nl-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--zx-purple), var(--zx-gold));
}

.zx-nl.is-open .zx-nl-backdrop {
  opacity: 1;
}
.zx-nl.is-open .zx-nl-dialog {
  opacity: 1;
  transform: none;
}

/* Przycisk zamykania — nadpisuje globalny fioletowy przycisk-pigułkę */
.zx-nl .zx-nl-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 500 !important;
  background-color: transparent !important;
  color: var(--zx-ink-soft) !important;
  border-radius: 50% !important;
  cursor: pointer;
}
.zx-nl .zx-nl-close:hover {
  background-color: var(--zx-lavender-bg) !important;
  color: var(--zx-purple) !important;
  transform: none;
}

.zx-nl-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--zx-ink);
  background-color: var(--zx-gold-soft);
  padding: 0.3em 0.9em;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.zx-nl .zx-nl-title {
  font-size: 1.55rem !important;
  line-height: 1.25 !important;
  margin: 0 0 0.6rem !important;
  padding-right: 1.5rem;
}

.zx-nl .zx-nl-lead {
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.zx-nl-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.zx-nl .zx-nl-input {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  color: var(--zx-ink);
  background-color: var(--zx-white);
  border: 1.5px solid var(--zx-lavender-border);
  border-radius: 999px;
  padding: 0.8em 1.2em;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.zx-nl .zx-nl-input:focus {
  border-color: var(--zx-purple-soft);
  box-shadow: 0 0 0 3px rgba(108, 92, 224, 0.18);
}

.zx-nl .zx-nl-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--zx-ink-soft);
  cursor: pointer;
}
.zx-nl .zx-nl-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0.1rem 0 0;
  accent-color: var(--zx-purple);
}
.zx-nl .zx-nl-consent a {
  text-decoration: underline;
}

.zx-nl .zx-nl-submit {
  width: 100%;
  cursor: pointer;
  font-size: 1rem;
}
.zx-nl .zx-nl-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.zx-nl .zx-nl-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}
.zx-nl .zx-nl-msg.is-error {
  color: #B3261E;
}

/* Pole-pułapka dla botów — poza ekranem, niewidoczne dla ludzi */
.zx-nl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Tekst tylko dla czytników ekranu */
.zx-nl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .zx-nl-dialog {
    padding: 2rem 1.25rem 1.5rem;
  }
  .zx-nl .zx-nl-title {
    font-size: 1.35rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zx-nl-backdrop,
  .zx-nl-dialog {
    transition: none;
  }
}
