/* Newsletter popup — ładowane na stronach Stories (bez pełnego app.css) */
:root {
  --np-card: #fff;
  --np-text: #1e293b;
  --np-muted: #64748b;
  --np-accent: #156b5c;
  --np-accent-text: #fff;
  --np-stroke: #e2e8f0;
  --np-radius: 8px;
  --np-radius-lg: 12px;
}

.newsletter-popup-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: np-fadeIn 0.35s ease-out;
}

.newsletter-popup-container {
  background: var(--np-card);
  color: var(--np-text);
  border-radius: var(--np-radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 2147483647;
  animation: np-slideUp 0.4s ease-out;
}

.newsletter-popup-content { position: relative; }

.newsletter-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: var(--np-muted);
  font-size: 1.1rem;
  line-height: 1;
}
.newsletter-popup-close:hover {
  background: var(--np-accent);
  color: var(--np-accent-text);
}

.newsletter-popup-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: var(--np-radius-lg) var(--np-radius-lg) 0 0;
}
.newsletter-popup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.newsletter-popup-text { padding: 28px 32px 32px; }
.newsletter-popup-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--np-text);
  text-align: center;
  line-height: 1.3;
}
.newsletter-popup-description {
  color: var(--np-muted);
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.95rem;
}
.newsletter-popup-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--np-text);
}
.newsletter-popup-features li {
  padding: 6px 0 6px 22px;
  position: relative;
}
.newsletter-popup-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--np-accent);
  font-weight: bold;
}

.newsletter-popup-form { margin: 0; }
.newsletter-popup-input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.newsletter-popup-input {
  flex: 1;
  min-width: 160px;
  padding: 12px 14px;
  border: 2px solid var(--np-stroke);
  border-radius: var(--np-radius);
  font-size: 15px;
  box-sizing: border-box;
}
.newsletter-popup-input:focus {
  outline: none;
  border-color: var(--np-accent);
}
.newsletter-popup-submit {
  padding: 12px 20px;
  background: var(--np-accent);
  color: var(--np-accent-text);
  border: none;
  border-radius: var(--np-radius);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-popup-submit:hover { filter: brightness(1.08); }
.newsletter-popup-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.newsletter-popup-privacy {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--np-muted);
  text-align: center;
}
.newsletter-popup-privacy a { color: var(--np-accent); }

.newsletter-popup-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--np-radius);
  font-size: 14px;
  margin-top: 14px;
}
.newsletter-popup-success {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.newsletter-popup-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

@keyframes np-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes np-slideUp {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes np-slideDown {
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
}

@media (max-width: 768px) {
  .newsletter-popup-overlay { padding: 14px; }
  .newsletter-popup-container { max-width: 100%; }
  .newsletter-popup-text { padding: 22px 18px 24px; }
  .newsletter-popup-title { font-size: 1.15rem; }
  .newsletter-popup-input-group { flex-direction: column; }
  .newsletter-popup-submit { width: 100%; }
  .newsletter-popup-image { height: 150px; }
}
