/* Pozdrower Exit Popup — styl zgodny z design systemem pozdrower.pl */

.pzd-exit__overlay {
  --pzd-blue: #2c5aa0;
  --pzd-blue-dark: #1d3f72;
  --pzd-text: #333;
  --pzd-text-light: #6c757d;
  --pzd-white: #fff;
  --pzd-border: #e0e4e8;
  --pzd-radius: 12px;
  --pzd-radius-sm: 8px;
  --pzd-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;                 /* JS przełącza na flex (.is-open) */
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  box-sizing: border-box;
}

.pzd-exit__overlay * { box-sizing: border-box; }

.pzd-exit__overlay.is-open {
  display: flex;
  animation: pzdExitFade 0.25s ease;
}

.pzd-exit__modal {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--pzd-white);
  border-radius: var(--pzd-radius);
  box-shadow: var(--pzd-shadow-lg);
  padding: 32px;
  animation: pzdExitRise 0.25s ease;
}

.pzd-exit__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #eef1f5;
  color: var(--pzd-text-light);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.pzd-exit__close svg {
  display: block;
  width: 18px;
  height: 18px;
}
.pzd-exit__close:hover {
  background: #e2e6ec;
  color: var(--pzd-text);
}
.pzd-exit__close:focus-visible {
  outline: 2px solid var(--pzd-blue);
  outline-offset: 2px;
}

.pzd-exit__title {
  margin: 0 0 6px;
  padding-right: 44px;
  font-size: 1.35em;
  color: var(--pzd-blue-dark);
  line-height: 1.3;
}

.pzd-exit__subtitle {
  margin: 0 0 20px;
  color: var(--pzd-text-light);
  font-size: 0.95em;
}

.pzd-exit__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.pzd-exit__card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--pzd-border);
  border-radius: var(--pzd-radius-sm);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.pzd-exit__card:hover,
.pzd-exit__card:focus-visible {
  border-color: var(--pzd-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(44, 90, 160, 0.18);
  outline: none;
}

.pzd-exit__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f0;
}
.pzd-exit__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pzd-exit__card-title {
  padding: 12px;
  font-size: 0.92em;
  font-weight: 600;
  color: var(--pzd-text);
  line-height: 1.4;
}

@keyframes pzdExitFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pzdExitRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile: karty poziome (miniatura z lewej) — bardziej kompaktowe.
   Uwaga: na urządzeniach dotykowych exit-intent i tak się nie uruchamia,
   te style dotyczą głównie wąskich okien na desktopie / tabletach hybrydowych. */
@media (max-width: 640px) {
  .pzd-exit__modal { padding: 24px 18px; }
  .pzd-exit__title { font-size: 1.2em; }
  .pzd-exit__grid { grid-template-columns: 1fr; }
  .pzd-exit__card { flex-direction: row; align-items: center; }
  .pzd-exit__thumb { width: 96px; min-width: 96px; aspect-ratio: 1 / 1; }
  .pzd-exit__card-title { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pzd-exit__overlay.is-open,
  .pzd-exit__modal { animation: none; }
  .pzd-exit__card { transition: none; }
}
