:root {
  --wgmp-banner-height: 0px;
  --wgmp-adminbar-height: 0px;
}

html.wgmp-no-scroll,
body.wgmp-no-scroll {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.admin-bar { --wgmp-adminbar-height: 32px; }

.wgmp-overlay[hidden],
.wgmp-banner[hidden] {
  display: none !important;
}

/* BANNER FISSO IN ALTO */
.wgmp-banner {
  position: fixed !important;
  z-index: 2147483000 !important;
  top: var(--wgmp-adminbar-height) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.wgmp-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

body.wgmp-has-top-banner {
  padding-top: var(--wgmp-banner-height) !important;
}

.wgmp-banner-inner {
  box-sizing: border-box !important;
  min-height: 56px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 18px;
  background: linear-gradient(90deg, #090909, #1d1116 50%, #090909);
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 7px 25px rgba(0,0,0,.28);
}

.wgmp-live-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff1744;
  box-shadow: 0 0 0 0 rgba(255,23,68,.55);
  animation: wgmp-pulse 1.65s infinite;
}

.wgmp-banner-text {
  font-size: 14px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
  color: #fff !important;
}

.wgmp-banner-button {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 17px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #ff0033 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  box-shadow: 0 5px 17px rgba(255,0,51,.28);
  transition: transform .15s ease, background .15s ease;
}

.wgmp-banner-button:hover,
.wgmp-banner-button:focus {
  background: #e0002d !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.wgmp-banner-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0 !important;
  border-radius: 50%;
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 32px !important;
  cursor: pointer;
}

/* POPUP */
.wgmp-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483640 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(4, 5, 9, .93);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  opacity: 0;
  transition: opacity .2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.wgmp-overlay.is-visible { opacity: 1; }

.wgmp-dialog {
  position: relative;
  width: min(94vw, 840px);
  max-height: min(92vh, 850px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  background: #fff;
  color: #12141a;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 22px;
  box-shadow: 0 35px 110px rgba(0,0,0,.58);
  transform: translateY(16px) scale(.98);
  transition: transform .2s ease;
  outline: none;
}

.wgmp-overlay.is-visible .wgmp-dialog { transform: translateY(0) scale(1); }

.wgmp-thumbnail-wrap {
  position: relative;
  min-height: 100%;
  display: block;
  overflow: hidden;
  border-radius: 22px 0 0 22px;
  background: #090909;
}

.wgmp-thumbnail {
  width: 100% !important;
  height: 100% !important;
  min-height: 420px;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
}

.wgmp-thumbnail-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,.02) 58%);
}

.wgmp-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 58px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 16px;
  background: #ff0033;
  color: #fff;
  font-size: 29px;
  box-shadow: 0 16px 38px rgba(0,0,0,.4);
}

.wgmp-content {
  padding: 42px 38px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wgmp-kicker {
  margin: 0 0 10px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  letter-spacing: .13em;
  font-weight: 900 !important;
  color: #ff0033 !important;
}

.wgmp-content h2 {
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-family: inherit !important;
  font-size: clamp(27px, 4vw, 38px) !important;
  line-height: 1.07 !important;
  font-weight: 900 !important;
  letter-spacing: -.02em !important;
  color: #0c0e12 !important;
}

.wgmp-content p#wgmp-message {
  margin: 0 0 22px !important;
  font-size: 16px !important;
  line-height: 1.52 !important;
  color: #424852 !important;
}

.wgmp-primary,
.wgmp-secondary {
  width: 100% !important;
  min-height: 54px;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 12px !important;
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: .01em;
  text-decoration: none !important;
  cursor: pointer;
}

.wgmp-primary {
  border: 0 !important;
  background: #ff0033 !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(255, 0, 51, .28);
}

.wgmp-primary:hover,
.wgmp-primary:focus {
  background: #df002d !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.wgmp-lock-box {
  margin: 14px 0 11px;
  padding: 12px 13px 11px;
  background: #f4f5f7;
  border: 1px solid #e0e2e6;
  border-radius: 11px;
}

.wgmp-countdown {
  min-height: 20px;
  text-align: center;
  font-size: 13px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  color: #4d535c !important;
}

.wgmp-countdown.is-unlocked { color: #137333 !important; }

.wgmp-progress {
  width: 100%;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9dce1;
}

.wgmp-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff0033;
  transition: width .28s linear;
}

.wgmp-secondary {
  border: 1px solid #cfd2d7 !important;
  background: #fff !important;
  color: #20242b !important;
}

.wgmp-secondary:hover,
.wgmp-secondary:focus { background: #f7f7f8 !important; }

.wgmp-note {
  margin: 14px 0 0 !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
  text-align: center;
  color: #7a808a !important;
}

.wgmp-close {
  position: absolute !important;
  z-index: 5 !important;
  top: 11px !important;
  right: 11px !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.96) !important;
  color: #111 !important;
  font-size: 29px !important;
  line-height: 36px !important;
  font-weight: 400 !important;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0,0,0,.18);
}

.wgmp-primary:focus-visible,
.wgmp-secondary:focus-visible,
.wgmp-close:focus-visible,
.wgmp-banner-button:focus-visible,
.wgmp-banner-close:focus-visible {
  outline: 3px solid #68a8ff !important;
  outline-offset: 2px !important;
}

@keyframes wgmp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,23,68,.55); }
  70% { box-shadow: 0 0 0 9px rgba(255,23,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,23,68,0); }
}

@media (max-width: 782px) {
  body.admin-bar { --wgmp-adminbar-height: 46px; }
}

@media (max-width: 700px) {
  .wgmp-banner-inner {
    min-height: 62px;
    gap: 8px;
    padding: 8px 9px;
  }

  .wgmp-live-dot { width: 8px; height: 8px; }

  .wgmp-banner-text {
    flex: 1 1 auto;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .wgmp-banner-button {
    min-height: 39px;
    padding: 0 10px !important;
    font-size: 11px !important;
  }

  .wgmp-banner-close { width: 29px !important; height: 29px !important; font-size: 21px !important; }

  .wgmp-overlay {
    align-items: flex-end;
    padding: 8px;
  }

  .wgmp-dialog {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 94vh;
    border-radius: 22px;
  }

  .wgmp-thumbnail-wrap { border-radius: 22px 22px 0 0; }

  .wgmp-thumbnail {
    min-height: 0;
    height: min(31vh, 220px) !important;
  }

  .wgmp-play { width: 67px; height: 48px; font-size: 23px; }

  .wgmp-content { padding: 24px 19px 18px; }

  .wgmp-content h2 { font-size: 27px !important; }
  .wgmp-content p#wgmp-message { font-size: 14px !important; margin-bottom: 17px !important; }
  .wgmp-primary, .wgmp-secondary { min-height: 50px; font-size: 14px !important; }
  .wgmp-lock-box { margin-top: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .wgmp-overlay,
  .wgmp-dialog,
  .wgmp-banner,
  .wgmp-progress span,
  .wgmp-banner-button {
    transition: none !important;
  }
  .wgmp-live-dot { animation: none !important; }
}

/* 1.2.0 — CTA nativa dentro i contenuti */
.wgmp-inline {
  box-sizing: border-box !important;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 28px 0 !important;
  padding: 17px 18px !important;
  border: 1px solid #e4e6ea !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(20, 24, 33, .08) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.wgmp-inline-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0f3;
  font-size: 22px;
}

.wgmp-inline-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wgmp-inline-copy strong {
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  color: #11141a !important;
}

.wgmp-inline-copy span {
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #5a606a !important;
}

.wgmp-inline-button {
  min-height: 42px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background: #ff0033 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(255,0,51,.20);
}

.wgmp-inline-button:hover,
.wgmp-inline-button:focus {
  background: #df002d !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* Richiamo flottante: compare dopo un po' o quando l'utente sta per uscire/ha letto molto. */
.wgmp-float[hidden] { display: none !important; }

.wgmp-float {
  position: fixed !important;
  z-index: 2147482500 !important;
  right: 18px !important;
  bottom: 18px !important;
  width: min(430px, calc(100vw - 36px));
  box-sizing: border-box !important;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(16, 17, 22, .97);
  color: #fff;
  box-shadow: 0 18px 54px rgba(0,0,0,.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}

.wgmp-float.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.wgmp-float-icon {
  font-size: 22px;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,.28));
  animation: wgmp-nudge 2.1s ease-in-out infinite;
}

.wgmp-float-text {
  min-width: 0;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
  color: #fff !important;
}

.wgmp-float-button {
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 13px !important;
  border-radius: 9px !important;
  background: #ff0033 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.wgmp-float-close {
  width: 30px;
  height: 30px;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 28px !important;
  cursor: pointer;
}

.wgmp-social-proof {
  margin: 12px 0 0 !important;
  padding: 9px 11px !important;
  border-radius: 10px;
  background: #fff7f8;
  border: 1px solid #ffd9e0;
  color: #6e2734 !important;
  text-align: center;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

@keyframes wgmp-nudge {
  0%, 72%, 100% { transform: rotate(0deg) scale(1); }
  78% { transform: rotate(-8deg) scale(1.05); }
  84% { transform: rotate(8deg) scale(1.05); }
  90% { transform: rotate(-4deg) scale(1.03); }
}

@media (max-width: 700px) {
  .wgmp-inline {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 11px;
    padding: 14px !important;
  }
  .wgmp-inline-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .wgmp-float {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    width: auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .wgmp-float-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .wgmp-float-close {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wgmp-float-icon,
  .wgmp-live-dot { animation: none !important; }
  .wgmp-float,
  .wgmp-banner,
  .wgmp-overlay,
  .wgmp-dialog { transition: none !important; }
}
