/**
 * GLPbase Newsletter — Popup + Inline CTA Styles
 * Scoped to .glpb-nl- prefix.
 */

/* ============================
   POPUP OVERLAY
   ============================ */
.glpb-nl-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.glpb-nl-overlay.glpb-nl-visible {
  opacity: 1;
  visibility: visible;
}

/* ============================
   POPUP CARD
   ============================ */
.glpb-nl-popup {
  position: relative;
  display: flex;
  max-width: 640px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.glpb-nl-visible .glpb-nl-popup {
  transform: scale(1);
}

/* Close button */
.glpb-nl-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  background: none;
  border: none;
  color: #999;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.glpb-nl-close:hover {
  color: #333;
  background: rgba(0,0,0,0.06);
}

/* ============================
   IMAGE PANEL (left side)
   ============================ */
.glpb-nl-image {
  width: 44%;
  flex-shrink: 0;
  background: #0D4D4D;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.glpb-nl-image svg {
  width: 100%;
  max-width: 200px;
  height: auto;
}
/* If using a real photo instead of SVG */
.glpb-nl-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================
   CONTENT PANEL (right side)
   ============================ */
.glpb-nl-content {
  flex: 1;
  background: #fff;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.glpb-nl-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: #0D4D4D;
  margin: 0 0 8px;
  line-height: 1.25;
}
.glpb-nl-content > p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 20px;
}

/* ============================
   FORM
   ============================ */
.glpb-nl-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.glpb-nl-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.glpb-nl-form input[type="email"]:focus {
  border-color: #C4A265;
  background: #fff;
}
.glpb-nl-form input[type="email"]::placeholder {
  color: #aaa;
}
.glpb-nl-form button[type="submit"] {
  width: 100%;
  padding: 12px 24px;
  background: #C4A265;
  color: #0D4D4D;
  border: none;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.glpb-nl-form button[type="submit"]:hover {
  background: #d4b275;
}
.glpb-nl-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Error message */
.glpb-nl-error {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #c0392b;
  margin: -4px 0 0;
}

/* Privacy note */
.glpb-nl-privacy {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: #999;
  margin: 6px 0 0;
  text-align: center;
}

/* Dismiss link */
.glpb-nl-dismiss {
  display: block;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #999;
  text-align: center;
  cursor: pointer;
  padding: 8px 0 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.glpb-nl-dismiss:hover {
  color: #666;
}

/* ============================
   SUCCESS STATE
   ============================ */
.glpb-nl-success {
  text-align: center;
  padding: 12px 0;
}
.glpb-nl-success svg {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
}
.glpb-nl-success h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #0D4D4D;
  margin: 0 0 8px;
}
.glpb-nl-success p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 18px;
}
.glpb-nl-success-btn {
  display: inline-block;
  padding: 10px 28px;
  background: #0D4D4D;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.glpb-nl-success-btn:hover {
  background: #C4A265;
  color: #0D4D4D;
}

/* ============================
   INLINE CTA (end of articles)
   ============================ */
.glpb-nl-inline {
  background: #0D4D4D;
  border-radius: 10px;
  padding: 28px 32px;
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.glpb-nl-inline-text {
  flex: 1;
}
.glpb-nl-inline-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #C4A265;
  margin: 0 0 6px;
  font-weight: 700;
}
.glpb-nl-inline-text p {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.5;
}
.glpb-nl-inline-form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.glpb-nl-inline-form input[type="email"] {
  padding: 11px 14px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #fff;
  background: rgba(255,255,255,0.08);
  outline: none;
  width: 220px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.glpb-nl-inline-form input[type="email"]:focus {
  border-color: #C4A265;
  background: rgba(255,255,255,0.12);
}
.glpb-nl-inline-form input[type="email"]::placeholder {
  color: rgba(255,255,255,0.4);
}
.glpb-nl-inline-form button[type="submit"] {
  padding: 11px 22px;
  background: #C4A265;
  color: #0D4D4D;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.glpb-nl-inline-form button[type="submit"]:hover {
  background: #d4b275;
}
.glpb-nl-inline-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
/* Inline success message */
.glpb-nl-inline-done {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #C4A265;
  font-weight: 600;
}

/* ============================
   SCROLL SLIDE-IN (bottom-right)
   ============================ */
.glpb-nl-slidein {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 20px 20px 18px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.3s ease;
  border: 1px solid rgba(0,0,0,0.06);
}
.glpb-nl-slidein.glpb-nl-slidein-show {
  transform: translateY(0);
  opacity: 1;
}
.glpb-nl-slidein-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color 0.2s;
}
.glpb-nl-slidein-close:hover { color: #555; }
.glpb-nl-slidein-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.glpb-nl-slidein-header svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.glpb-nl-slidein-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: #0D4D4D;
  margin: 0;
}
.glpb-nl-slidein-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: #777;
  margin: 0 0 12px;
  line-height: 1.4;
}
.glpb-nl-slidein-form {
  display: flex;
  gap: 6px;
}
.glpb-nl-slidein-form input[type="email"] {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #333;
  background: #fafafa;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.glpb-nl-slidein-form input[type="email"]:focus {
  border-color: #C4A265;
  background: #fff;
}
.glpb-nl-slidein-form input[type="email"]::placeholder { color: #aaa; }
.glpb-nl-slidein-form button[type="submit"] {
  padding: 9px 16px;
  background: #C4A265;
  color: #0D4D4D;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.glpb-nl-slidein-form button[type="submit"]:hover { background: #d4b275; }
.glpb-nl-slidein-form button[type="submit"]:disabled { opacity: 0.7; cursor: not-allowed; }
.glpb-nl-slidein-done {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #27ae60;
  font-weight: 600;
  text-align: center;
  padding: 4px 0;
}

/* ============================
   ENGAGE CTA (forum login prompts)
   ============================ */
.glpb-nl-engage {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
  text-align: center;
}
.glpb-nl-engage p {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #777;
  margin: 0 0 10px;
}
.glpb-nl-engage-form {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.glpb-nl-engage-form input[type="email"] {
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #333;
  background: #fff;
  outline: none;
  width: 200px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.glpb-nl-engage-form input[type="email"]:focus { border-color: #C4A265; }
.glpb-nl-engage-form input[type="email"]::placeholder { color: #aaa; }
.glpb-nl-engage-form button[type="submit"] {
  padding: 9px 16px;
  background: #C4A265;
  color: #0D4D4D;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.glpb-nl-engage-form button[type="submit"]:hover { background: #d4b275; }
.glpb-nl-engage-form button[type="submit"]:disabled { opacity: 0.7; cursor: not-allowed; }
.glpb-nl-engage-done {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #27ae60;
  font-weight: 600;
}

/* ============================
   MOBILE RESPONSIVE
   ============================ */
@media (max-width: 600px) {
  .glpb-nl-overlay { padding: 16px; }

  .glpb-nl-popup {
    flex-direction: column;
    max-width: 400px;
  }
  .glpb-nl-image {
    width: 100%;
    padding: 24px 20px;
  }
  .glpb-nl-image svg { max-width: 140px; }
  .glpb-nl-content {
    padding: 24px 22px 20px;
  }
  .glpb-nl-content h2 { font-size: 20px; }
  .glpb-nl-close {
    color: rgba(255,255,255,0.7);
  }
  .glpb-nl-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
  }

  /* Inline CTA stacks vertically */
  .glpb-nl-inline {
    flex-direction: column;
    padding: 24px 20px;
    gap: 16px;
    text-align: center;
  }
  .glpb-nl-inline-form {
    flex-direction: column;
    width: 100%;
  }
  .glpb-nl-inline-form input[type="email"] {
    width: 100%;
  }

  /* Slide-in: full width on small screens */
  .glpb-nl-slidein {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  /* Engage form stacks */
  .glpb-nl-engage-form {
    flex-direction: column;
    align-items: stretch;
  }
  .glpb-nl-engage-form input[type="email"] { width: 100%; }
}
