/* =========================================================
   Popup Newsletter — DD Popup
   ========================================================= */

/* Overlay — mobile only */
.newsletter-popup__overlay {
  display: none;
}

.newsletter-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  z-index: 999999;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Open Sans", sans-serif;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  max-width: 690px;
}

.newsletter-popup.visible {
  transform: translateY(0);
}

/* Image */
.newsletter-popup__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Content */
.newsletter-popup__content {
  grid-column: 2;
  grid-row: 1;
  padding: 20px;
  position: relative;
  min-width: 0;
}

/* Close button */
.newsletter-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
}

.newsletter-popup__close:hover {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
}

/* Title */
.newsletter-popup__title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px;
  padding-right: 32px;
}

/* Text */
.newsletter-popup__text {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  margin: 0 0 14px;
}

/* Honeypot — invisible */
.newsletter-popup__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Form */
.newsletter-popup__form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.newsletter-popup__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  text-align: center;
}

.newsletter-popup__input:focus {
  border-color: #3a478e;
}

.newsletter-popup__submit {
  width: 100%;
  padding: 10px 16px;
  background: #3a478e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.newsletter-popup__submit:hover {
  background: #2d3770;
}

.newsletter-popup__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Messages — hidden by default, replaces form on submit */
.newsletter-popup__message {
  font-size: 12px;
  display: none;
  border-radius: 4px;
  padding: 10px;
  color: #fff;
  text-align: center;
}

.newsletter-popup__message--success {
  background-color: #46b450;
}

.newsletter-popup__message--error {
  background-color: #ffb900;
}

/* Legal */
.newsletter-popup__legal {
  font-size: 11px;
  line-height: 1.5;
  color: #888;
  margin: 8px 0 0;
}

.newsletter-popup__legal a {
  color: #3a478e;
  text-decoration: underline;
}

.newsletter-popup__legal a:hover {
  color: #2d3770;
}

/* Dismiss */
.newsletter-popup__dismiss {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  border: none;
  background: none;
  color: #888;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s;
}

.newsletter-popup__dismiss:hover {
  color: #333;
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 768px) {
  .newsletter-popup__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999998;
  }

  .newsletter-popup__overlay.visible {
    display: block;
  }

  .newsletter-popup {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    grid-template-columns: 1fr;
    align-items: stretch;
    overflow-y: auto;
  }

  .newsletter-popup__image img {
    aspect-ratio: 5 / 3;
  }

  .newsletter-popup__content {
    grid-column: 1;
    grid-row: auto;
  }

  .newsletter-popup__title,
  .newsletter-popup__text,
  .newsletter-popup__legal {
    text-align: center;
  }
}
