/* Scoped styles for EHN Engagement */
.ehn-engagement-root, .ehn-engagement-root * { box-sizing: border-box; }

.ehn-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 999999;
  opacity: 0; pointer-events: none;
  transition: opacity 180ms ease;
}
.ehn-overlay.ehn-show { opacity: 1; pointer-events: auto; }

.ehn-popup {
  position: relative;
  background: #fff; color: #111;
  width: min(92vw, 560px);
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  box-shadow: 0 15px 60px rgba(0,0,0,0.35);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}
.ehn-popup.ehn-show { transform: translateY(0); opacity: 1; }
.ehn-popup.ehn-anim-none { transition: none; transform: none; }
.ehn-popup.ehn-anim-slide { transform: translateY(18px); }

.ehn-close {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  min-width: 40px; min-height: 40px;
  margin: 0; padding: 0;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  font-size: 24px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  touch-action: manipulation;
}
.ehn-close span {
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  pointer-events: none;
}

.ehn-popup-body { padding: 22px 18px 18px; }

.ehn-fullscreen .ehn-popup {
  width: 96vw; height: 92vh; max-height: 92vh; border-radius: 16px;
}

.ehn-slidein-wrap { position: fixed; z-index: 999999; inset: 0; pointer-events: none; }
.ehn-slidein {
  position: absolute; pointer-events: auto;
  width: min(92vw, 420px);
  max-height: 85vh; overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 15px 60px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateX(24px);
  transition: transform 220ms ease, opacity 220ms ease;
}
.ehn-slidein.ehn-show { opacity: 1; transform: translateX(0); }
.ehn-slidein.ehn-from-left { left: 14px; bottom: 14px; transform: translateX(-24px); }
.ehn-slidein.ehn-from-right { right: 14px; bottom: 14px; }
.ehn-slidein.ehn-from-bottom { left: 50%; bottom: 14px; transform: translate(-50%, 24px); }
.ehn-slidein.ehn-from-bottom.ehn-show { transform: translate(-50%, 0); }

/* Sidebar (off-canvas) */
.ehn-sidebar-wrap {
  position: fixed; inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.ehn-sidebar-wrap.ehn-show { opacity: 1; pointer-events: auto; }

.ehn-sidebar {
  position: absolute;
  top: 0; bottom: 0;
  width: min(92vw, 420px);
  max-width: 520px;
  background: #fff; color: #111;
  overflow: auto;
  box-shadow: 0 18px 70px rgba(0,0,0,0.30);
  opacity: 1;
  transform: translateX(100%);
  transition: transform 240ms ease;
}
.ehn-sidebar.ehn-from-right { right: 0; border-top-left-radius: 16px; border-bottom-left-radius: 16px; }
.ehn-sidebar.ehn-from-left { left: 0; transform: translateX(-100%); border-top-right-radius: 16px; border-bottom-right-radius: 16px; }
.ehn-sidebar.ehn-show { transform: translateX(0); }
.ehn-sidebar .ehn-close { top: 12px; right: 12px; }

.ehn-notify {
  position: fixed; z-index: 999999;
  width: min(92vw, 360px);
  background: #111; color: #fff;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 12px 45px rgba(0,0,0,0.3);
  opacity: 0; transform: translateY(10px);
  transition: transform 200ms ease, opacity 200ms ease;
}
.ehn-notify.ehn-show { opacity: 1; transform: translateY(0); }
.ehn-corner-br { right: 14px; bottom: 14px; }
.ehn-corner-bl { left: 14px; bottom: 14px; }
.ehn-corner-tr { right: 14px; top: 14px; }
.ehn-corner-tl { left: 14px; top: 14px; }

.ehn-bar {
  position: fixed; left: 0; right: 0;
  z-index: 999999;
  background: #111; color: #fff;
  padding: 12px 52px 12px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translate(var(--ehn-bar-x, 0), -100%);
  transition: transform 220ms ease, opacity 220ms ease;
}
.ehn-bar.ehn-bottom { bottom: 0; transform: translate(var(--ehn-bar-x, 0), 100%); }
.ehn-bar.ehn-top { top: 0; }
.ehn-bar.ehn-show { opacity: 1; transform: translate(var(--ehn-bar-x, 0), 0); }
.ehn-bar.ehn-bar-custom-width { right: auto; }
.ehn-bar .ehn-close { top: 8px; right: 10px; background: rgba(255,255,255,0.15); color: #fff; }

.ehn-widget {
  position: fixed; z-index: 999999;
  width: min(92vw, 360px);
  background: #fff; color: #111;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.30);
  overflow: hidden;
  opacity: 0; transform: translateY(12px);
  transition: transform 220ms ease, opacity 220ms ease;
}
.ehn-widget.ehn-show { opacity: 1; transform: translateY(0); }

.ehn-widget-handle {
  position: fixed; z-index: 999998;
  width: 56px; height: 56px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #111; color: #fff;
  box-shadow: 0 14px 45px rgba(0,0,0,0.28);
}
.ehn-widget-handle.ehn-corner-br { right: 14px; bottom: 14px; }
.ehn-widget-handle.ehn-corner-bl { left: 14px; bottom: 14px; }
.ehn-widget-handle.ehn-corner-tr { right: 14px; top: 14px; }
.ehn-widget-handle.ehn-corner-tl { left: 14px; top: 14px; }


@media (max-width: 768px) {
  .ehn-overlay,
  .ehn-slidein-wrap,
  .ehn-sidebar-wrap {
    inset: 0 !important;
    align-items: stretch;
    justify-content: stretch;
  }

  .ehn-popup,
  .ehn-fullscreen .ehn-popup,
  .ehn-slidein,
  .ehn-slidein.ehn-from-left,
  .ehn-slidein.ehn-from-right,
  .ehn-slidein.ehn-from-bottom,
  .ehn-sidebar,
  .ehn-sidebar.ehn-from-left,
  .ehn-sidebar.ehn-from-right,
  .ehn-notify,
  .ehn-bar,
  .ehn-widget {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 100vh;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: auto;
  }

  .ehn-popup.ehn-show,
  .ehn-fullscreen .ehn-popup.ehn-show,
  .ehn-slidein.ehn-show,
  .ehn-slidein.ehn-from-left.ehn-show,
  .ehn-slidein.ehn-from-right.ehn-show,
  .ehn-slidein.ehn-from-bottom.ehn-show,
  .ehn-sidebar.ehn-show,
  .ehn-notify.ehn-show,
  .ehn-bar.ehn-show,
  .ehn-widget.ehn-show {
    transform: none !important;
  }

  .ehn-popup-body {
    min-height: 100%;
    padding-top: 64px !important;
  }

  .ehn-bar {
    padding: 64px 18px 18px !important;
  }

  .ehn-notify,
  .ehn-widget {
    padding-top: 52px;
  }

  .ehn-close,
  .ehn-sidebar .ehn-close,
  .ehn-bar .ehn-close {
    top: 12px;
    right: 12px;
  }
}

.ehn-inline-popup { border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; padding: 12px; }

/* Button helpers */
.ehn-engagement-root .ehn-btn,
.ehn-engagement-root a.ehn-btn,
.ehn-engagement-root button.ehn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: #111;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.ehn-engagement-root .ehn-btn.ehn-btn-outline { background: transparent; color: currentColor; border: 1px solid currentColor; }
.ehn-engagement-root .ehn-btn + .ehn-btn { margin-left: 8px; }
