/* v1.2.0 | 2025-11-16 16:58 | Achievements cards styling */
/* v1.2.1 | 2025-11-16 17:28 | Medal redesign, avatar chip, locked/unlocked visuals */



/* Grid container (if used by parent) */
.sh-ach-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }

/* Card */
.ach-card { height:420px; position:relative; background:linear-gradient(180deg,#2b2560,#1a1428); border:1px solid rgba(255,255,255,0.06); border-radius:18px; padding:24px 20px; color:#eaeaea; box-shadow:0 16px 36px rgba(0,0,0,0.4); overflow:hidden; isolation:isolate; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; }
.ach-card.unlocked { filter:none; border-color:rgba(255,255,255,0.18); }
.ach-card.locked { filter:grayscale(100%); opacity:1; }

/* Medal header */
.ach-top{ width:100%; display:flex; align-items:center; justify-content:center; margin-bottom:18px; }
.ach-medal{ position:relative; width:64px; height:64px; flex:0 0 64px; border-radius:50%; background:radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,0.2), rgba(255,255,255,0) 60%), linear-gradient(135deg,#8a4fff, #ff5da2); box-shadow:inset 0 0 0 2px rgba(255,255,255,0.15), 0 10px 22px rgba(0,0,0,0.35); overflow:hidden; }
.ach-medal .medal-bg{ position:absolute; inset:0; background-size:cover; background-position:center; filter:saturate(1.1) contrast(1.05) blur(0.5px); opacity:0.5; }
.ach-medal .medal-inner{ position:absolute; inset:8px; border-radius:50%; background:rgba(14,15,18,0.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15), inset 0 10px 18px rgba(0,0,0,0.35); display:flex; align-items:center; justify-content:center; }
.medal-emoji{ font-size:26px; line-height:1; }

/* (user chip removed for now) */

/* No extra pseudo-background: keep single card surface */
.ach-card::before { content:none; }

/* Media */
.ach-media { position:relative; width:100%; height:180px; border-radius:12px; overflow:hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }

/* Badge (top-right) */
.ach-badge { position:absolute; top:12px; right:12px; background:#ff3066; color:#fff; font-weight:700; font-size:12px; padding:6px 10px; border-radius:999px; box-shadow:0 6px 16px rgba(255,48,102,0.35); letter-spacing:0.2px; }

/* Blur overlay + Lock */
.blur-overlay { position:absolute; inset:0; /*backdrop-filter:blur(0px); border-radius:12px; background:linear-gradient(180deg, rgba(16,17,20,0) 0%, rgba(16,17,20,0.45) 60%, rgba(16,17,20,0.75) 100%); */ }
.ach-lock { display:inline-flex; align-items:center; gap:8px; font-size:13px; color:#c6c6c6; background:rgba(16,17,20,0.6); padding:6px 12px; border-radius:999px; border:1px solid rgba(255,255,255,0.12); }

/* Typography */
.ach-title { margin:16px 0 8px; font-size:22px; line-height:1.3; font-weight:800; color:#ffffff; text-shadow:0 1px 0 rgba(0,0,0,0.25); text-align:center; }
.ach-sub { margin:0 0 18px; font-size:14px; line-height:1.7; color:#d2d2d2; text-align:center; max-width:260px; }

.ach-body{ padding:4px 0 0; text-align:center; display:flex; flex-direction:column; align-items:center; }
.ach-bottom{ width:100%; display:flex; align-items:center; justify-content:center; margin-top:10px; }

/* Actions */
.ach-actions { display:flex; gap:10px; margin-top:8px; }
.btn-download { appearance:none; border:0; border-radius:999px; background:#2b8cff; color:#fff; font-weight:200; font-size:11px; padding:10px 24px; cursor:pointer; box-shadow:0 8px 20px rgba(43,140,255,0.35); transition:transform .08s ease, box-shadow .12s ease; }
.btn-download:hover { transform:translateY(-1px); box-shadow:0 10px 26px rgba(43,140,255,0.45); }
.btn-download:active { transform:translateY(0); box-shadow:0 6px 16px rgba(43,140,255,0.3); }

/* Branding footer inside card (for share image) */
.ach-branding{ position:absolute; left:20px; right:20px; bottom:18px; margin-top:0; padding-top:10px; border-top:1px solid rgba(255,255,255,0.12); }
.ach-brand-row{ display:flex; align-items:center; gap:10px; }
.ach-brand-logo{ width:28px; height:28px; border-radius:999px; object-fit:contain; background:#111; box-shadow:0 4px 10px rgba(0,0,0,0.45); }
.ach-brand-text{ display:flex; flex-direction:column; gap:2px; }
.ach-brand-title{ font-size:11px; font-weight:700; letter-spacing:0.03em; text-transform:uppercase; color:#f5f5f5; opacity:0.9; }
.ach-brand-sub{ font-size:11px; line-height:1.4; color:#d0d0d0; opacity:0.9; }

/* Share preview modal */
.ach-share-modal{ position:fixed; inset:0; background:rgba(0,0,0,0.75); display:flex; align-items:center; justify-content:center; z-index:9999; padding:16px; }
.ach-share-dialog{ background:#05060a; border-radius:16px; padding:16px; max-width:520px; width:100%; box-shadow:0 20px 48px rgba(0,0,0,0.65); border:1px solid rgba(255,255,255,0.1); }
.ach-share-preview-wrap{ background:#111; border-radius:12px; padding:8px; display:flex; align-items:center; justify-content:center; }
.ach-share-preview{ max-width:100%; height:auto; border-radius:12px; display:block; }
.ach-share-actions{ margin-top:12px; display:flex; justify-content:flex-end; gap:8px; }
.ach-share-btn{ appearance:none; border-radius:999px; border:0; padding:8px 14px; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; }
.ach-share-download{ background:#2b8cff; color:#fff; box-shadow:0 8px 20px rgba(43,140,255,0.4); }
.ach-share-close{ background:#16161b; color:#e2e2e2; border:1px solid rgba(255,255,255,0.18); }
.ach-share-copy,.ach-share-native{ background:#f5f5f5; color:#111; }

/* Loading state */
.ach-share-modal.ach-share-loading .ach-share-dialog{
  background:transparent;
  border:none;
  box-shadow:none;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ach-share-spinner{
  width:40px;
  height:40px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,0.2);
  border-top-color:#2b8cff;
  animation:ach-spin 0.9s linear infinite;
}
@keyframes ach-spin{ to{ transform:rotate(360deg); } }

/* For share image crispness */
.ach-card [data-lucide]{ width:18px; height:18px; stroke:#fff; opacity:0.95; }

/* Light background fallback (if theme is light) */
@media (prefers-color-scheme: light){
  .ach-card{ background:#ffffff; color:#222; border-color:rgba(0,0,0,0.06); }
  .ach-title{ color:#111; text-shadow:none; }
  .ach-sub{ color:#444; }
  .ach-lock{ background:rgba(255,255,255,0.7); color:#222; border-color:rgba(0,0,0,0.06); }
}
