/* CHB MailPoet welcome popup — polished green / gold / cream */
#chb-popup-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#chb-popup-root.is-open {
  display: flex !important;
}

#chb-popup-root .chb-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 13, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#chb-popup-root .chb-popup-card {
  position: relative;
  width: min(640px, 100%);
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(200px, 0.95fr) 1.2fr;
  background: #f7f2eb;
  border-radius: 20px;
  box-shadow:
    0 30px 80px rgba(15, 20, 12, 0.4),
    0 0 0 1px rgba(201, 168, 76, 0.18);
  overflow: hidden;
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  z-index: 1;
}
#chb-popup-root.is-open .chb-popup-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Image panel */
#chb-popup-root .chb-popup-media {
  position: relative;
  min-height: 100%;
  background-color: #2f3d2a;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
#chb-popup-root .chb-popup-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 30% 80%, rgba(201, 168, 76, 0.22) 0%, transparent 55%),
    linear-gradient(165deg, rgba(47, 61, 42, 0.2) 0%, rgba(31, 41, 28, 0.72) 100%);
  z-index: 0;
}
#chb-popup-root .chb-popup-media-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  background: linear-gradient(180deg, #e8d08a, #c9a84c);
  color: #2a2208;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Body / form */
#chb-popup-root .chb-popup-body {
  padding: 1.65rem 1.5rem 1.4rem;
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(201, 168, 76, 0.08) 0%, transparent 55%),
    #f7f2eb;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#chb-popup-root .chb-popup-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 0.9rem;
  opacity: 0.95;
}

#chb-popup-root .chb-popup-kicker {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #4a5a3f;
  margin: 0 0 0.45rem;
}

#chb-popup-root h2,
#chb-popup-root #chb-popup-title {
  margin: 0 0 0.55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.18;
  color: #2f3d2a;
  font-weight: 500;
  letter-spacing: -0.01em;
}

#chb-popup-root .chb-popup-copy {
  margin: 0 0 1.1rem;
  color: #5c6456;
  font-size: 0.9rem;
  line-height: 1.55;
}

#chb-popup-root .chb-popup-form {
  display: grid;
  gap: 0.55rem;
}

#chb-popup-root .chb-popup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

#chb-popup-root input[type="text"],
#chb-popup-root input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd4c6;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  font-size: 0.95rem;
  color: #2a2a2a;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#chb-popup-root input::placeholder {
  color: #9a958c;
}
#chb-popup-root input:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.22);
  background: #fff;
}

#chb-popup-root .chb-popup-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

#chb-popup-root .chb-popup-submit {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8d08a, #c9a84c);
  color: #2a2208 !important;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  width: 100%;
  box-shadow: 0 10px 24px rgba(47, 61, 42, 0.16);
  font-family: inherit;
  margin-top: 0.15rem;
}
#chb-popup-root .chb-popup-submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(47, 61, 42, 0.2);
}
#chb-popup-root .chb-popup-submit:active {
  transform: scale(0.985);
}
#chb-popup-root .chb-popup-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

#chb-popup-root .chb-popup-note {
  margin: 0.55rem 0 0;
  font-size: 0.7rem;
  color: #8a9084;
  line-height: 1.45;
  text-align: center;
}

#chb-popup-root .chb-popup-msg {
  display: none;
  margin-top: 0.45rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.4;
}
#chb-popup-root .chb-popup-msg.is-error {
  display: block;
  background: #fff4ef;
  color: #8f3a22;
  border: 1px solid #f0cfc0;
}
#chb-popup-root .chb-popup-msg.is-ok {
  display: block;
  background: #eef5e8;
  color: #2f4a2a;
  border: 1px solid #c7d8b5;
}

#chb-popup-root .chb-popup-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(247, 242, 235, 0.96);
  color: #4a5a3f;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 5;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
#chb-popup-root .chb-popup-close:hover {
  color: #2f3d2a;
  background: #fff;
  transform: scale(1.05);
}

#chb-popup-root .chb-popup-success-title {
  margin: 0 0 0.45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  color: #2f3d2a;
  font-weight: 500;
}

#chb-popup-root #chb-popup-panel-success {
  text-align: left;
}

/* Mobile */
@media (max-width: 640px) {
  #chb-popup-root {
    padding: 0.65rem;
    align-items: flex-end;
  }
  #chb-popup-root .chb-popup-card {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 18px 18px 14px 14px;
    max-height: min(92vh, 720px);
    overflow: auto;
  }
  #chb-popup-root .chb-popup-media {
    min-height: 150px;
    height: 150px;
  }
  #chb-popup-root .chb-popup-media-badge {
    left: 0.85rem;
    bottom: 0.85rem;
  }
  #chb-popup-root .chb-popup-body {
    padding: 1.25rem 1.15rem 1.2rem;
  }
  #chb-popup-root .chb-popup-row {
    grid-template-columns: 1fr;
  }
  #chb-popup-root h2,
  #chb-popup-root #chb-popup-title {
    font-size: 1.4rem;
  }
}

body.chb-popup-lock {
  overflow: hidden !important;
}
