.wpmarco-mailup-popup[hidden] {
  display: none;
}

.wpmarco-mailup-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.wpmarco-mailup-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 12, 0.72);
  backdrop-filter: blur(4px);
}

.wpmarco-mailup-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, 480px);
  margin: min(7vh, 56px) auto;
  background: linear-gradient(180deg, #f8f7ef 0%, #ffffff 100%);
  border: 1px solid rgba(38, 66, 45, 0.15);
  border-radius: 20px;
  box-shadow: 0 24px 72px rgba(14, 34, 19, 0.22);
  overflow: hidden;
}

.wpmarco-mailup-popup__content {
  padding: 24px;
}

.wpmarco-mailup-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #27492f;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.wpmarco-mailup-popup__eyebrow {
  margin: 0 0 8px;
  color: #4b6b52;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wpmarco-mailup-popup__title {
  margin: 0;
  color: #17341f;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.1;
}

.wpmarco-mailup-popup__description {
  margin: 12px 0 0;
  color: #415546;
  font-size: 15px;
  line-height: 1.5;
}

.wpmarco-mailup-popup__form {
  margin-top: 18px;
}

.wpmarco-mailup-popup__field,
.wpmarco-mailup-popup__groups {
  margin-bottom: 12px;
}

.wpmarco-mailup-popup__field label,
.wpmarco-mailup-popup__groups legend {
  display: block;
  margin-bottom: 6px;
  color: #17341f;
  font-size: 13px;
  font-weight: 600;
}

.wpmarco-mailup-popup__field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cad7cc;
  border-radius: 14px;
  background: #fff;
  color: #17341f;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}

.wpmarco-mailup-popup__groups {
  border: 0;
  padding: 0;
}

.wpmarco-mailup-popup__choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cad7cc;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
  color: #17341f;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}

.wpmarco-mailup-popup__privacy {
  display: flex;
  gap: 10px;
  color: #415546;
  font-size: 13px;
  line-height: 1.5;
}

.wpmarco-mailup-popup__privacy a {
  color: #1d6b38;
}

.wpmarco-mailup-popup__submit {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: #1f6a39;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.wpmarco-mailup-popup__submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.wpmarco-mailup-popup__message {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.wpmarco-mailup-popup__field input:focus,
.wpmarco-mailup-popup__choice:focus-within,
.wpmarco-mailup-popup__submit:focus,
.wpmarco-mailup-popup__close:focus,
.wpmarco-mailup-popup__privacy input:focus {
  outline: 2px solid #1f6a39;
  outline-offset: 2px;
}

.wpmarco-mailup-popup__choice input {
  margin: 0;
  flex: 0 0 auto;
}

.wpmarco-mailup-popup__message[data-state="success"] {
  color: #166534;
}

.wpmarco-mailup-popup__message[data-state="error"] {
  color: #b91c1c;
}

.wpmarco-mailup-popup-open {
  overflow: hidden;
}

.wpmarco-mailup-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  max-width: min(92vw, 360px);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(14, 34, 19, 0.18);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.wpmarco-mailup-toast[data-state="pending"] {
  background: #1f6a39;
}

.wpmarco-mailup-toast[data-state="success"] {
  background: #166534;
}

.wpmarco-mailup-toast[data-state="error"] {
  background: #b91c1c;
}

@media (max-width: 640px) {
  .wpmarco-mailup-popup__dialog {
    width: min(100% - 20px, 420px);
    margin: 20px auto;
  }

  .wpmarco-mailup-popup__content {
    padding: 20px 16px 18px;
  }

  .wpmarco-mailup-popup__title {
    font-size: 22px;
  }

  .wpmarco-mailup-popup__description {
    font-size: 14px;
  }

  .wpmarco-mailup-toast {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}
