/* «لكي لا ينسوا» — add-on styles for memorial copies. Uses the copied site's own tokens. */

/* the copy is read-only and never shows the family tree */
#tree,
#siteNav a[href="#tree"],
#editToggle,
#editBar,
#txtBar,
#gate,
.edit-only{display:none !important}

/* link back to the section, pinned to the bottom corner */
.mm-back{
  position:fixed;z-index:calc(var(--z-chrome,120) + 5);
  bottom:calc(16px + env(safe-area-inset-bottom,0px));
  inset-inline-start:max(12px,env(safe-area-inset-left,0px));
  display:none;align-items:center;gap:4px;
  min-height:38px;padding:0 12px 0 14px;border-radius:999px;
  background:rgba(20,46,32,.88);color:var(--gold-3,#e8c96a);
  border:1px solid rgba(232,201,106,.55);
  font:700 .9rem system-ui,-apple-system,'Segoe UI',sans-serif;text-decoration:none;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
}
.mm-back svg{width:16px;height:16px}
body.is-memorial .mm-back{display:inline-flex}

/* section */
.mm-sec{background:linear-gradient(180deg,var(--beige,#f3ead8),var(--cream,#faf5ea))}
.mm-wrap{max-width:760px;margin:0 auto;display:grid;gap:34px}

.mm-actions{display:grid;gap:12px;justify-items:center}
.mm-dua{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  width:min(520px,100%);min-height:64px;padding:10px 12px 10px 22px;
  border-radius:18px;border:2px solid var(--gold,#c9a227);
  background:var(--green,#1e4631);color:var(--cream,#faf5ea);
  font:inherit;font-family:var(--font-head);font-size:1.25rem;text-align:start;cursor:pointer;
  box-shadow:var(--shadow-lg);
  transition:transform .1s,background .15s;
  -webkit-tap-highlight-color:transparent;
}
.mm-dua:hover{background:var(--green-2,#2d5a3d)}
.mm-dua:active{transform:scale(.98)}
.mm-dua:focus-visible{outline:3px solid var(--gold-3,#e8c96a);outline-offset:3px}
.mm-dua[disabled]{opacity:.6;cursor:default}
.mm-dua span{flex:1;line-height:1.5}
.mm-dua-n{
  flex-shrink:0;min-width:64px;padding:8px 12px;border-radius:12px;text-align:center;
  background:var(--gold-3,#e8c96a);color:var(--dark,#142e20);
  font-family:var(--font-body);font-size:1.2rem;font-variant-numeric:tabular-nums;
}
.mm-dua.is-bump .mm-dua-n{animation:mm-bump .35s ease}
@keyframes mm-bump{40%{transform:scale(1.18)}}
@media (prefers-reduced-motion:reduce){.mm-dua.is-bump .mm-dua-n{animation:none}}

.mm-views{display:flex;align-items:center;gap:6px;color:var(--brown,#6b4f2e);font-size:1rem}
.mm-views svg{width:20px;height:20px;color:var(--gold,#c9a227)}
.mm-views b{color:var(--green,#1e4631);font-variant-numeric:tabular-nums}

.mm-comments h3{font-family:var(--font-head);font-size:1.6rem;color:var(--green,#1e4631);margin-bottom:12px;text-align:center}
.mm-form{
  display:grid;gap:10px;padding:18px;border-radius:var(--radius-lg,22px);
  background:#fff;border:1px solid var(--beige-3,#dcc9a3);box-shadow:var(--shadow);
}
.mm-label{font-weight:700;color:var(--ink,#2a2318);font-size:1rem}
.mm-form textarea{
  width:100%;resize:vertical;min-height:88px;padding:12px 14px;border-radius:12px;
  border:1px solid var(--beige-3,#dcc9a3);background:var(--cream,#faf5ea);color:var(--ink,#2a2318);
  font:inherit;font-size:1.05rem;line-height:1.7;
}
.mm-form textarea:focus{outline:2px solid var(--gold,#c9a227);outline-offset:1px;border-color:transparent}
.mm-form-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.mm-count{font-size:.9rem;color:var(--brown,#6b4f2e);font-variant-numeric:tabular-nums}
.mm-count.is-over{color:var(--danger,#8c2f24);font-weight:700}
.mm-send{display:inline-flex !important;pointer-events:auto !important}
.mm-send[disabled]{opacity:.6}
.mm-msg{font-size:.95rem;color:var(--danger,#8c2f24)}
.mm-msg.is-ok{color:var(--green-3,#3f7a54);font-weight:700}

.mm-list{list-style:none;display:grid;gap:10px;margin-top:16px}
.mm-list li{
  padding:14px 16px;border-radius:14px;background:#fff;
  border:1px solid var(--beige-2,#ece0c8);border-inline-start:4px solid var(--gold,#c9a227);
}
.mm-list p{font-size:1.08rem;line-height:1.8;color:var(--ink,#2a2318);overflow-wrap:anywhere}
.mm-list time{display:block;margin-top:4px;font-size:.82rem;color:var(--brown,#6b4f2e);opacity:.8}
.mm-empty{margin-top:14px;text-align:center;color:var(--brown,#6b4f2e)}
