/* AMSocial gifts on Amwaly article pages: the "support the writer with a gift" card. It reads the Bright design tokens
   when the page has them and falls back to the same values on the classic design; dark mode follows
   html[data-bs-theme], direction follows the page language. The panel itself is styled by gifts.css (shared with AMSocial). */
.amgw{--amgw-acc:#ff4d8d;--amgw-acc2:#ff9f43;--amgw-gem:#7c3aed;position:relative;display:flex;align-items:flex-start;gap:16px;margin:24px 0;
  padding:20px;border:1px solid var(--bm-line,rgba(16,35,26,.09));border-radius:var(--bright-radius-card,20px);overflow:hidden;
  background:var(--bm-surface,#fff);box-shadow:var(--bm-shadow-sm,0 10px 28px rgba(8,67,36,.075));
  font-family:inherit;line-height:1.6;text-align:start;isolation:isolate}
.amgw::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(110% 90% at 100% 0,rgba(255,77,141,.1),transparent 55%),radial-gradient(90% 80% at 0 100%,rgba(255,159,67,.1),transparent 60%)}
.amgw[hidden]{display:none}
.amgw__icon{flex:0 0 auto;width:52px;height:52px;border-radius:16px;display:grid;place-items:center;color:#fff;
  background:linear-gradient(135deg,var(--amgw-acc),var(--amgw-acc2));box-shadow:0 10px 24px rgba(255,77,141,.28)}
.amgw__icon svg{width:26px;height:26px}
.amgw__body{flex:1;min-width:0}
.amgw .amgw__eyebrow{margin:0 0 2px!important;font-size:.78rem;font-weight:800;line-height:1.6}
.amgw h2{margin:0 0 6px!important;padding:0;border:0;font-size:1.12rem;font-weight:800;line-height:1.55;overflow-wrap:anywhere}
.amgw h2::before,.amgw h2::after{content:none!important}
.amgw .amgw__lead,.amgw .amgw__first{margin:0 0 14px!important;font-size:.92rem;line-height:1.8}
.amgw__first[hidden],.amgw__stats[hidden]{display:none}
.amgw__stats{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0 0 14px}
.amgw__total{display:inline-flex;align-items:center;gap:6px;font-size:1rem}
.amgw__total svg{color:var(--amgw-gem);flex-shrink:0}
.amgw__total b{font-weight:800;font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.amgw__total small{font-size:.8rem;font-weight:600}
.amgw__faces{display:inline-flex;align-items:center;gap:8px;min-height:36px;margin:0;padding:4px 6px;padding-inline-end:12px;border:0;border-radius:999px;
  background:var(--bm-surface-3,#f4f8f5);font:inherit;font-size:.8rem;font-weight:700;cursor:pointer;transition:background .15s}
.amgw__faces:hover{background:var(--bm-green-50,#edf8f1)}
.amgw__faces .f{display:inline-flex}
.amgw__faces img{width:28px;height:28px;border-radius:50%;object-fit:cover;border:2px solid var(--bm-surface,#fff);margin-inline-start:-8px;background:#e5e7eb}
.amgw__faces img:first-child{margin-inline-start:0}
.amgw__actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.amgw__send{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;margin:0;padding:0 22px;border:0;
  border-radius:var(--bright-radius-control,14px);background:linear-gradient(135deg,var(--amgw-acc),var(--amgw-acc2));
  font:inherit;font-size:.95rem;font-weight:800;line-height:1.2;text-decoration:none!important;cursor:pointer;
  box-shadow:0 10px 22px rgba(255,77,141,.25);transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}
.amgw__send:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(255,77,141,.32);filter:saturate(1.08)}
.amgw__send:active{transform:none}
.amgw__send svg{flex-shrink:0}
.amgw__send:focus-visible,.amgw__faces:focus-visible{outline:3px solid rgba(255,77,141,.45);outline-offset:2px}
.amgw .amgw__note{margin:10px 0 0!important;font-size:.85rem;line-height:1.7}
.amgw__note:empty{display:none}
.amgw__note a{font-weight:800;text-decoration:underline}
.amgw-bump{animation:amgw-bump .5s ease}
@keyframes amgw-bump{40%{transform:scale(1.12)}}
@media (max-width:575.98px){
  .amgw{gap:12px;padding:16px;margin:18px 0}
  .amgw__icon{width:40px;height:40px;border-radius:13px}
  .amgw__icon svg{width:21px;height:21px}
  .amgw h2{font-size:1.02rem}
  .amgw__actions,.amgw__send{width:100%}
}
@media (prefers-reduced-motion:reduce){.amgw__send,.amgw__faces{transition:none}.amgw-bump{animation:none}}
@media print{.amgw{display:none}}

/* Colors are scoped by the card's id: a theme's broad !important text colors (its dark mode paints every p and a) never
   repaint the card. */
#amwaly-gifts{color:var(--bm-ink,#10231a)}
#amwaly-gifts h2,#amwaly-gifts .amgw__total b,#amwaly-gifts .amgw__faces span{color:var(--bm-ink,#10231a)!important}
#amwaly-gifts .amgw__eyebrow,#amwaly-gifts .amgw__note a{color:var(--amgw-acc)!important}
#amwaly-gifts .amgw__lead,#amwaly-gifts .amgw__first,#amwaly-gifts .amgw__note,#amwaly-gifts .amgw__total small{color:var(--bm-muted,#637068)!important}
#amwaly-gifts .amgw__note.bad{color:#c0264f!important}
#amwaly-gifts .amgw__send,#amwaly-gifts .amgw__send span{color:#fff!important}

html[data-bs-theme="dark"] .amgw{background:var(--bm-surface,#14261d);border-color:var(--bm-line,rgba(238,248,241,.12))}
html[data-bs-theme="dark"] .amgw::before{background:radial-gradient(110% 90% at 100% 0,rgba(255,77,141,.14),transparent 55%),radial-gradient(90% 80% at 0 100%,rgba(255,159,67,.1),transparent 60%)}
html[data-bs-theme="dark"] #amwaly-gifts,html[data-bs-theme="dark"] #amwaly-gifts h2,html[data-bs-theme="dark"] #amwaly-gifts .amgw__total b,
html[data-bs-theme="dark"] #amwaly-gifts .amgw__faces span{color:var(--bm-ink,#f4fbf6)!important}
html[data-bs-theme="dark"] #amwaly-gifts .amgw__lead,html[data-bs-theme="dark"] #amwaly-gifts .amgw__first,html[data-bs-theme="dark"] #amwaly-gifts .amgw__note,
html[data-bs-theme="dark"] #amwaly-gifts .amgw__total small{color:var(--bm-muted,#bdc9c0)!important}
html[data-bs-theme="dark"] #amwaly-gifts .amgw__eyebrow,html[data-bs-theme="dark"] #amwaly-gifts .amgw__note a{color:#ff8fb6!important}
html[data-bs-theme="dark"] #amwaly-gifts .amgw__note.bad{color:#ff8fa8!important}
html[data-bs-theme="dark"] .amgw__total svg{color:#b69cff}
html[data-bs-theme="dark"] .amgw__faces{background:rgba(255,255,255,.07)}
html[data-bs-theme="dark"] .amgw__faces:hover{background:rgba(255,255,255,.12)}
html[data-bs-theme="dark"] .amgw__faces img{border-color:var(--bm-surface,#14261d)}

/* The shared panel on this site: Amwaly's own dark surfaces instead of AMSocial's. */
html[data-bs-theme="dark"] .amgf.dark{--bg:#14261d;--card:#1b3326;--line:rgba(238,248,241,.12);--fg:#f4fbf6;--mut:#bdc9c0}
