/*
 * HID Extension — Brevo Subscribe Popup Styles
 */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.hid-subscribe-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

/* ── Popup box ───────────────────────────────────────────────────────────── */
.hid-subscribe-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.hid-subscribe-popup[hidden] {
  display: none;
}

.hid-subscribe-popup__box {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 40px 36px 36px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  animation: hid-popup-in 280ms ease both;
}

@keyframes hid-popup-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Close button ────────────────────────────────────────────────────────── */
.hid-subscribe-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: rgba(42, 42, 42, 0.4);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.hid-subscribe-popup__close:hover {
  color: #2a2a2a;
  background: #f5f5f5;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.hid-subscribe-popup__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: block;
}

.hid-subscribe-popup__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.hid-subscribe-popup__sub {
  font-size: 0.9rem;
  color: rgba(42, 42, 42, 0.65);
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ── Brevo form overrides — scoped to popup only ─────────────────────────── */
/* These target the exact classes Brevo outputs, scoped strictly inside the popup box. */

.hid-subscribe-popup__form .sib_signup_form {
  text-align: left;
}

/* Email input */
.hid-subscribe-popup__form input.sib-email-area,
.hid-subscribe-popup__form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d6eac8;
  border-radius: 6px;
  font-size: 15px;
  color: #2a2a2a;
  background: #f0f6e7;
  box-sizing: border-box;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
  outline: none;
  margin-bottom: 10px;
  display: block;
}

.hid-subscribe-popup__form input.sib-email-area:focus,
.hid-subscribe-popup__form input[type="email"]:focus {
  border-color: #67bd50;
  box-shadow: 0 0 0 3px rgba(103, 189, 80, 0.15);
  background: #ffffff;
}

/* Textarea — Brevo forms that include a message/custom field */
.hid-subscribe-popup__form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d6eac8;
  border-radius: 6px;
  font-size: 15px;
  color: #2a2a2a;
  background: #f0f6e7;
  box-sizing: border-box;
  outline: none;
  resize: vertical;
  margin-bottom: 10px;
  display: block;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.hid-subscribe-popup__form textarea:focus {
  border-color: #67bd50;
  box-shadow: 0 0 0 3px rgba(103, 189, 80, 0.15);
  background: #ffffff;
}

/* Submit button */
.hid-subscribe-popup__form input.sib-default-btn,
.hid-subscribe-popup__form input[type="submit"] {
  width: 100%;
  padding: 13px 0;
  background: #67bd50;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 100ms ease;
  letter-spacing: 0.02em;
}

.hid-subscribe-popup__form input.sib-default-btn:hover {
  background: #58a844;
}

.hid-subscribe-popup__form input.sib-default-btn:active {
  transform: scale(0.99);
}

/* Brevo success / error message area */
.hid-subscribe-popup__form .sib_msg_disp {
  margin-bottom: 12px;
  font-size: 14px;
  border-radius: 6px;
  padding: 10px 14px;
  text-align: center;
}

/* Paragraph wrappers Brevo outputs around the fields */
.hid-subscribe-popup__form p {
  margin: 0;
}

/* Loader spinner */
.hid-subscribe-popup__form .sib_loader {
  text-align: center;
  margin-bottom: 10px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hid-subscribe-popup__box {
    padding: 32px 20px 24px;
    border-radius: 10px;
  }

  .hid-subscribe-popup__title {
    font-size: 1.1rem;
  }
}
