/* PWA AN-NUR AL-MUSTAFA */
:root {
  --annur-pwa-green: #0b7a3b;
  --annur-pwa-green-dark: #07572b;
  --annur-pwa-yellow: #f4d900;
  --annur-pwa-cream: #fffde7;
}

html.annur-pwa-loading,
html.annur-pwa-loading body {
  overflow: hidden !important;
}

#annur-pwa-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.98) 0, rgba(255,253,231,.98) 34%, rgba(224,244,211,.98) 68%, rgba(11,122,59,.98) 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .32s ease, visibility .32s ease;
  isolation: isolate;
}

#annur-pwa-splash.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.annur-pwa-splash-card {
  width: min(86vw, 340px);
  padding: 30px 24px 26px;
  border: 1px solid rgba(11,122,59,.14);
  border-radius: 30px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 24px 70px rgba(5,65,32,.18);
  text-align: center;
  transform: translateY(10px) scale(.98);
  transition: transform .42s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#annur-pwa-splash.is-visible .annur-pwa-splash-card {
  transform: translateY(0) scale(1);
}

.annur-pwa-logo-wrap {
  width: 124px;
  height: 124px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0b7a3b;
  box-shadow: 0 9px 24px rgba(11,122,59,.22);
  overflow: hidden;
}

.annur-pwa-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.annur-pwa-title {
  margin: 0;
  color: #07572b;
  font: 800 18px/1.25 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .055em;
}

.annur-pwa-subtitle {
  margin: 7px 0 20px;
  color: #53665a;
  font: 600 11px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.annur-pwa-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 11px;
  border: 4px solid rgba(11,122,59,.16);
  border-top-color: var(--annur-pwa-green);
  border-right-color: var(--annur-pwa-yellow);
  border-radius: 50%;
  animation: annur-pwa-spin .82s linear infinite;
}

.annur-pwa-loading-text {
  margin: 0;
  color: #64746a;
  font: 600 12px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.annur-pwa-progress {
  height: 4px;
  margin: 18px 7px 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(11,122,59,.12);
}

.annur-pwa-progress::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b7a3b, #f4d900);
  animation: annur-pwa-progress 1.35s ease-in-out infinite;
}

@keyframes annur-pwa-spin { to { transform: rotate(360deg); } }
@keyframes annur-pwa-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}

#annur-pwa-install {
  position: fixed;
  z-index: 2147482000;
  right: 18px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: none;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0b7a3b, #07572b);
  box-shadow: 0 10px 28px rgba(5,65,32,.28);
  font: 800 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#annur-pwa-install.is-visible { display: inline-flex; }
#annur-pwa-install:focus-visible { outline: 3px solid #f4d900; outline-offset: 3px; }
#annur-pwa-install svg { width: 17px; height: 17px; }

#annur-pwa-help {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(2,25,12,.62);
}
#annur-pwa-help.is-visible { display: grid; }
.annur-pwa-help-card {
  width: min(100%, 390px);
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  color: #153323;
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.annur-pwa-help-card h2 { margin: 0 0 9px; color: #07572b; font-size: 18px; }
.annur-pwa-help-card ol { margin: 12px 0 18px; padding-left: 22px; }
.annur-pwa-help-card li { margin: 7px 0; }
.annur-pwa-help-close {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: #0b7a3b;
  color: #fff;
  font-weight: 800;
}

@media (max-width: 600px) {
  #annur-pwa-install {
    right: 14px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .annur-pwa-spinner, .annur-pwa-progress::after { animation-duration: 2.5s; }
  #annur-pwa-splash, .annur-pwa-splash-card { transition-duration: .01ms; }
}
