/**
 * Zelda Push Notifications — opt-in modal / toast styling (GAMEPLAN §14.1).
 *
 * Uses the theme design tokens with hardcoded fallbacks so it matches the site
 * whether or not the theme :root is in scope (and on GTranslate subdomains).
 * Palette: forest green (#253124/#1a2419) + metallic gold (#d4af37), Outfit font.
 */

.zpn-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 16, 10, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: zpn-fade 0.25s ease-out;
}

.zpn-modal {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 24px;
  text-align: center;
  color: var(--text-light, #fff);
  background: var(--main-bg, #253124);
  background-image: linear-gradient(180deg, #2b3a29 0%, var(--main-dark, #1a2419) 100%);
  border: 2px solid var(--main-gold, #d4af37);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 55, 0.25) inset;
  font-family: var(--font-family-primary, 'Outfit', sans-serif);
  animation: zpn-pop 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.zpn-hero {
  display: block;
  width: 128px;
  height: auto;
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.zpn-title {
  margin: 0 0 8px;
  font-size: 1.4em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--main-gold, #d4af37);
  font-family: var(--font-family-accent, 'EB Garamond', serif);
}

.zpn-body {
  margin: 0 0 18px;
  font-size: 1em;
  line-height: 1.55;
  color: #e8efe2;
}

.zpn-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zpn-btn {
  display: block;
  width: 100%;
  padding: 12px 18px;
  font-size: 1em;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.zpn-btn.zpn-allow {
  color: var(--main-dark, #1a2419);
  background: linear-gradient(180deg, #e9c75a 0%, var(--main-gold, #d4af37) 100%);
  border-color: #b8932b;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.zpn-btn.zpn-allow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.5);
}

.zpn-btn.zpn-dismiss {
  color: var(--main-accent, #a6cc8b);
  background: transparent;
  border-color: rgba(166, 204, 139, 0.4);
}

.zpn-btn.zpn-dismiss:hover {
  background: rgba(166, 204, 139, 0.12);
}

.zpn-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--main-accent, #a6cc8b);
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.75;
}

.zpn-close:hover {
  opacity: 1;
}

/* iOS install guide variant */
.zpn-ios-steps {
  margin: 0 0 18px;
  padding: 0 0 0 1.2em;
  text-align: left;
  color: #e8efe2;
  line-height: 1.6;
}

.zpn-ios-steps li {
  margin-bottom: 6px;
}

@keyframes zpn-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zpn-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .zpn-modal-overlay,
  .zpn-modal {
    animation: none;
  }
}

/* Respect RTL (Arabic site_lang, §12.1) */
[dir='rtl'] .zpn-ios-steps {
  text-align: right;
  padding: 0 1.2em 0 0;
}

[dir='rtl'] .zpn-close {
  right: auto;
  left: 10px;
}
