/* DhikrApp statistics sharing + one-time achievements */
.profile-mini.profile-mini-share{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  min-height:116px;
  padding:14px 16px;
  direction:ltr;
  overflow:visible!important;
}
.profile-mini-avatar-stack{
  display:grid;
  justify-items:center;
  align-content:center;
  gap:7px;
  min-width:82px;
}
.profile-mini.profile-mini-share .avatar-link,
.profile-mini.profile-mini-share .avatar-link img{
  width:68px;
  height:68px;
}
.profile-mini-copy{min-width:0;text-align:left;direction:ltr}
html[dir="rtl"] .profile-mini-copy{direction:rtl;text-align:right}
.profile-mini-copy strong{
  display:block;
  color:#f5fff8;
  font-size:21px;
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-mini-copy p{
  margin:5px 0 0;
  color:var(--muted);
  direction:ltr;
  unicode-bidi:embed;
  font-size:15px;
}
.profile-premium-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:132px;
  padding:5px 11px;
  border-radius:999px;
  color:#ffe39a;
  border:1px solid rgba(245,200,92,.55);
  background:linear-gradient(180deg,rgba(245,200,92,.20),rgba(245,200,92,.07));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 7px 18px rgba(0,0,0,.15);
  font-size:11px;
  font-weight:900;
  line-height:1.15;
  white-space:nowrap;
}
.profile-premium-badge-large{
  margin:0 auto 8px;
  padding:6px 15px;
  font-size:12px;
}
.share-stats-button,
.profile-share-button{
  -webkit-tap-highlight-color:transparent;
  border:1px solid rgba(245,200,92,.38);
  background:linear-gradient(180deg,rgba(245,200,92,.16),rgba(255,255,255,.035));
  color:#ffe39a;
  border-radius:16px;
  min-height:44px;
  padding:9px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-weight:900;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 10px 22px rgba(0,0,0,.18);
}
.share-stats-button{max-width:142px;line-height:1.25;font-size:12px}
.share-stats-icon{font-size:20px;line-height:1}
.profile-card-enhanced{position:relative;padding-top:20px!important;overflow:visible!important}
.profile-card-enhanced h1{margin-top:7px}
.profile-share-button{
  position:absolute;
  top:14px;
  right:14px;
  z-index:5;
  min-height:40px;
  padding:8px 11px;
  font-size:12px;
}
html[dir="rtl"] .profile-share-button{right:14px;left:auto}

body.share-modal-open{overflow:hidden!important}
.share-image-modal{
  position:fixed;
  inset:0;
  z-index:15000;
  display:grid;
  place-items:center;
  padding:14px;
}
.share-image-modal[hidden]{display:none!important}
.share-image-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.82);
  backdrop-filter:blur(8px);
}
.share-image-panel{
  position:relative;
  z-index:1;
  width:min(540px,100%);
  max-height:calc(100vh - 28px);
  overflow:auto;
  overscroll-behavior:contain;
  padding:14px;
  border-radius:28px;
  background:linear-gradient(180deg,#123326,#071b13);
  border:1px solid rgba(245,200,92,.44);
  box-shadow:0 30px 90px rgba(0,0,0,.68),inset 0 1px 0 rgba(255,255,255,.05);
}
.share-image-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.share-image-head h3{margin:0;color:#fff5d8;font-size:20px}
.share-image-close{
  width:40px;
  height:40px;
  flex:0 0 auto;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.07);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.achievement-modal-copy{text-align:center;margin:0 4px 12px}
.achievement-modal-copy strong{display:block;color:#ffe39a;font-size:24px;margin-bottom:6px}
.achievement-modal-copy p{margin:0;color:#d5e7db;line-height:1.7;font-size:14px}
.share-preview-wrap{
  display:grid;
  place-items:center;
  min-height:260px;
  border-radius:21px;
  overflow:hidden;
  background:#06140e;
  border:1px solid rgba(255,255,255,.08);
}
.share-preview-wrap.is-loading::before{
  content:"";
  width:44px;
  height:44px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.12);
  border-top-color:#f5c85c;
  animation:shareSpin .8s linear infinite;
}
@keyframes shareSpin{to{transform:rotate(360deg)}}
.share-preview{width:100%;height:auto;display:block}
.share-preview-wrap.is-loading .share-preview{display:none}
.share-image-note{margin:10px 4px 0;color:#b9cebf;font-size:12px;text-align:center;line-height:1.6}
.share-image-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:9px;margin-top:12px}
.share-action{
  min-height:52px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.07);
  color:#eefcf3;
  font-weight:900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
}
.share-action.primary{color:#132016;background:linear-gradient(135deg,#f6d77d,#d9a83e);border-color:#f4d37a}
.share-action small{display:block;font-size:9px;font-weight:700;opacity:.75;margin-top:2px}
.share-action:disabled{opacity:.58;cursor:wait;pointer-events:none;filter:saturate(.65)}

/* Always show feedback above the preview and the Android bottom bar. */
.app-toast{
  z-index:17000!important;
  top:calc(env(safe-area-inset-top,0px) + 74px)!important;
  bottom:auto!important;
}

@media(max-width:520px){
  .profile-mini.profile-mini-share{
    grid-template-columns:70px minmax(0,1fr) 46px;
    gap:10px;
    padding:13px 12px;
  }
  .profile-mini.profile-mini-share .avatar-link,
  .profile-mini.profile-mini-share .avatar-link img{width:60px;height:60px}
  .profile-mini-avatar-stack{min-width:64px}
  .profile-mini-copy strong{font-size:18px}
  .share-stats-button{width:44px;height:44px;min-height:44px;padding:0;border-radius:15px}
  .share-stats-button>span:last-child{display:none}
  .profile-share-button{width:42px;height:42px;padding:0;border-radius:14px}
  .profile-share-button>span:last-child{display:none}
  .share-image-panel{padding:11px;border-radius:23px}
  .share-image-actions{grid-template-columns:1fr}
}
