
#igUniversalPageGuardV2 {
  --igpg-forest: var(--forest, #1a3829);
  --igpg-forest-2: #0c5a46;
  --igpg-gold: var(--gold, #c9a84c);
  --igpg-gold-light: var(--gold-light, #e2c87a);
  --igpg-bg: var(--bg-body, #f8f3e8);
  --igpg-card: var(--bg-card, #ffffff);
  --igpg-text: var(--text-primary, #1c1c1c);
  --igpg-muted: var(--text-subtle, #6a8070);
  --igpg-border: var(--border-soft, rgba(26,56,41,.12));

  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 !important;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--igpg-bg) !important;
  color: var(--igpg-text);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 999999;
}

html[data-theme="dark"] #igUniversalPageGuardV2 {
  --igpg-bg: var(--bg-body, #0d1c14);
  --igpg-card: var(--bg-card, #162b1f);
  --igpg-text: var(--text-primary, #f0ebe0);
  --igpg-muted: var(--text-subtle, #a8cdb5);
  --igpg-border: rgba(201,168,76,.18);
}

#igUniversalPageGuardV2 *,
#igUniversalPageGuardV2 *::before,
#igUniversalPageGuardV2 *::after { box-sizing: border-box; }

#igUniversalPageGuardV2 .igpg-card {
  width: min(500px, 100%);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid var(--igpg-border);
  border-radius: 30px;
  background: color-mix(in srgb, var(--igpg-card) 88%, transparent);
  box-shadow:
    0 32px 80px rgba(7,26,18,.18),
    0 0 0 1px rgba(201,168,76,.08);
  text-align: center;
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

html[data-theme="dark"] #igUniversalPageGuardV2 .igpg-card {
  box-shadow:
    0 32px 90px rgba(0,0,0,.45),
    0 0 0 1px rgba(201,168,76,.12);
}

#igUniversalPageGuardV2 .igpg-logo-wrap {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--igpg-gold-light), var(--igpg-gold));
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.55),
    inset 0 -5px 11px rgba(7,26,18,.22),
    0 14px 32px rgba(0,0,0,.22),
    0 0 0 8px rgba(201,168,76,.13),
    0 0 30px rgba(201,168,76,.30);
}

#igUniversalPageGuardV2 .igpg-logo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2px solid rgba(9,38,28,.75);
}

#igUniversalPageGuardV2 .igpg-loader {
  width: 42px;
  height: 42px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid rgba(201,168,76,.2);
  border-top-color: var(--igpg-gold);
  animation: igpgSpinV2 .8s linear infinite;
}

#igUniversalPageGuardV2 .igpg-title {
  margin: 0 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(27px, 5vw, 38px);
  line-height: 1.1;
  letter-spacing: -.035em;
  color: var(--igpg-text);
}

#igUniversalPageGuardV2 .igpg-text {
  max-width: 380px;
  margin: 0 auto 24px;
  color: var(--igpg-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

#igUniversalPageGuardV2 .igpg-page-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,76,.24);
  background: rgba(201,168,76,.10);
  color: var(--igpg-gold);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html[data-theme="dark"] #igUniversalPageGuardV2 .igpg-page-label {
  color: var(--igpg-gold-light);
  background: rgba(226,200,122,.08);
  border-color: rgba(226,200,122,.22);
}

#igUniversalPageGuardV2 .igpg-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--igpg-forest), var(--igpg-forest-2));
  color: #fff;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(12,90,70,.22);
  transition: transform .22s ease, box-shadow .22s ease;
}

#igUniversalPageGuardV2 .igpg-button:hover,
#igUniversalPageGuardV2 .igpg-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(12,90,70,.28), 0 0 0 4px rgba(201,168,76,.13);
  outline: none;
}

html[data-theme="dark"] #igUniversalPageGuardV2 .igpg-button {
  background: linear-gradient(135deg, var(--igpg-gold-light), var(--igpg-gold));
  color: #082217;
}

#igUniversalPageGuardV2.is-denied .igpg-button { display: inline-flex; }
#igUniversalPageGuardV2.is-denied .igpg-loader { display: none; }
#igUniversalPageGuardV2.is-allowed { display: none !important; }

/* If a legacy Elementor Page Guard widget remains on a page, keep only the
   plugin-owned overlay visually authoritative. Remove old widgets when practical. */
section#igUniversalPageGuardV2:not([data-igtnm-page-guard]) { visibility: hidden; }

@keyframes igpgSpinV2 { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  #igUniversalPageGuardV2 .igpg-loader { animation: none !important; }
}

@media (max-width: 620px) {
  #igUniversalPageGuardV2 { padding: 18px; }
  #igUniversalPageGuardV2 .igpg-card {
    padding: 28px 22px;
    border-radius: 24px;
  }
  #igUniversalPageGuardV2 .igpg-logo-wrap {
    width: 76px;
    height: 76px;
  }
}


/* V1.4.1 fail-closed support */
html.igtnm-access-checking,
html.igtnm-access-checking body {
  overflow: hidden !important;
}

#igUniversalPageGuardV2[data-igtnm-page-guard] {
  z-index: 2147483646 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
