/* =========================================
   Theme variables
   ========================================= */
:root{
  --worthy-purple:#523F7C;          /* main */
  --worthy-purple-darker:#3D2B64;   /* bar */
  --worthy-purple-200:#EDE7FA;      /* light tint */
  --worthy-purple-600:#3F2E6F;      /* dark text on light tint */
  --worthy-white:#ffffff;
  --worthy-overlay:rgba(0,0,0,.55);
}

/* =========================================
   Prayer Bar (dark purple background strip)
   ========================================= */
.worthy-pray-wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  background:var(--worthy-purple-darker);
  color:var(--worthy-white);
  width:100%;
  box-sizing:border-box;
  padding:12px 18px;
  border-radius:6px;
}

/* Left: boxed button */
.worthy-pray-cta{
  background:var(--worthy-white);
  color:var(--worthy-purple);
  font-weight:600;
  padding:8px 14px;
  border:2px solid var(--worthy-purple);
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
  transition:background .2s ease, color .2s ease, border-color .2s ease, transform .06s ease, box-shadow .2s ease;
}
.worthy-pray-cta:hover{
  background:#F7F5FD;
  color:var(--worthy-purple-darker);
  border-color:var(--worthy-purple-darker);
}
.worthy-pray-cta:active{ transform:translateY(1px); }
.worthy-pray-cta:focus-visible{
  outline:2px solid var(--worthy-white);
  outline-offset:2px;
}
.worthy-pray-cta.worthy-pray-busy{ opacity:.75; cursor:progress; }

/* Purple “done” state (no green) */
.worthy-pray-cta.worthy-pray-done{
  background:var(--worthy-purple-200);
  color:var(--worthy-purple-600);
  border-color:var(--worthy-purple);
}

/* Purple feedback ring when on cooldown tap */
.worthy-pray-cta.worthy-pray-ack{
  box-shadow:0 0 0 3px rgba(82,63,124,.35);
}

/* Right: icon + big number + caption (white on purple) */
.worthy-pray-stats{
  display:flex; align-items:center; gap:.6rem; color:var(--worthy-white);
}
.worthy-pray-icon-img{
  width:60px; height:60px; object-fit:contain; flex:0 0 auto;
}
.worthy-pray-bigcount{
  font-size:1.8rem; font-weight:800; line-height:1; font-variant-numeric:tabular-nums;
}
.worthy-pray-caption{
  font-size:.9rem; line-height:1.25; max-width:260px;
}

@media (max-width: 640px){
  .worthy-pray-wrap{ flex-direction:column; align-items:stretch; gap:.75rem; padding:12px 14px; }
  .worthy-pray-stats{ justify-content:flex-start; }
  .worthy-pray-bigcount{ font-size:1.6rem; }
}

/* =========================================
   Share Popup — purple background, white text
   (matches JS: .worthy-pray-overlay / .worthy-pray-share)
   ========================================= */
.worthy-pray-overlay{
  position:fixed; inset:0; background:var(--worthy-overlay);
  display:grid; place-items:center; z-index:9999;
  /* start hidden but mounted; JS toggles .open */
  opacity:0; transform:scale(.98); pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
}
.worthy-pray-overlay.open{
  opacity:1; transform:scale(1); pointer-events:auto;
}

/* Popup panel */
.worthy-pray-share{
  position:relative;  /* anchor for the close button */
  background:var(--worthy-purple);
  color:var(--worthy-white);
  width:min(560px, 92vw);
  border-radius:16px; padding:20px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  text-align:left;
}
.worthy-pray-share h3{ margin:0 0 .25rem; font-size:1.25rem; color:var(--worthy-white); }
.worthy-pray-share p{ margin:.25rem 0 1rem; color:var(--worthy-white); }

/* Close button — perfectly centered “×” inside its box */
.worthy-pray-close{
  position:absolute; top:8px; right:10px;
  width:34px; height:34px; padding:0; box-sizing:border-box;
  display:inline-flex; align-items:center; justify-content:center;
  border:2px solid var(--worthy-white); border-radius:8px;
  background:transparent; color:var(--worthy-white);
  font-size:20px; line-height:1; font-weight:700; font-family:inherit;
  cursor:pointer; z-index:2;
}
.worthy-pray-close:hover{ background:rgba(255,255,255,.12); }
.worthy-pray-close:focus-visible{ outline:2px solid #fff; outline-offset:2px; }

/* Share grid and buttons */
.worthy-pray-share-grid{
  display:grid; grid-template-columns:repeat(5, 1fr); gap:.5rem;
}
.share-btn{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:.4rem; padding:.75rem .5rem;
  background:#ffffff; color:#111; text-decoration:none; font-weight:700; font-size:.9rem;
  border:1px solid transparent; border-radius:12px;
  transition:transform .06s ease, background .2s ease, border-color .2s ease;
}
.share-btn:hover{ background:#F2F2F2; transform:translateY(1px); }
.share-btn svg{ display:block; }
@media (max-width: 520px){
  .worthy-pray-share-grid{ grid-template-columns:repeat(3, 1fr); }
}