/* =============================================================================
   The Agentic Economy — Sharing UI
   Self-contained styles for the floating share widget + in-player share menu.
   Namespaced under .aes- to avoid collisions. Reuses the two-ring brand motif.
   ========================================================================== */
:root{
  --aes-blue:#1257E6;
  --aes-green:#0FB39C;
  --aes-ink:#0E1622;
  --aes-ink-2:#38465A;
  --aes-muted:#71808F;
  --aes-line:#D4E0E5;
  --aes-white:#FFFFFF;
  --aes-panel:#FFFFFF;
  --aes-shadow:0 18px 50px rgba(14,22,34,.20);
  --aes-shadow-sm:0 2px 10px rgba(14,22,34,.14);
}

/* ---------------- Floating action button (FAB) ---------------- */
.aes-fab{
  position:fixed; right:24px; bottom:24px; z-index:9000;
  width:56px; height:56px; border:none; border-radius:50%;
  background:linear-gradient(92deg,var(--aes-blue) 0%,var(--aes-green) 100%);
  color:#fff; cursor:pointer; padding:0;
  box-shadow:0 8px 24px rgba(18,87,230,.34);
  display:flex; align-items:center; justify-content:center;
  transition:transform .18s ease, box-shadow .18s ease, opacity .25s ease;
}
.aes-fab:hover{ transform:translateY(-2px) scale(1.04); box-shadow:0 12px 30px rgba(18,87,230,.42); }
.aes-fab:active{ transform:translateY(0) scale(.98); }
.aes-fab svg{ width:24px; height:24px; position:relative; z-index:2; }
.aes-fab .aes-ring{ position:absolute; inset:-3px; transform:rotate(-90deg); pointer-events:none; }
.aes-fab .aes-ring circle{ fill:none; stroke-width:3; }
.aes-fab .aes-ring .aes-track{ stroke:rgba(255,255,255,.28); }
.aes-fab .aes-ring .aes-prog{ stroke:#fff; stroke-linecap:round;
  transition:stroke-dashoffset .15s linear; }
.aes-fab[aria-expanded="true"]{ transform:rotate(90deg); }
@media(max-width:680px){ .aes-fab{ right:16px; bottom:16px; width:50px; height:50px; } }

/* tiny label that fades in on first load */
.aes-fab-hint{
  position:fixed; right:90px; bottom:38px; z-index:8999;
  background:var(--aes-ink); color:#fff; font:600 12.5px/1 "Inter",system-ui,sans-serif;
  padding:9px 13px; border-radius:9px; white-space:nowrap; box-shadow:var(--aes-shadow-sm);
  opacity:0; transform:translateX(6px); pointer-events:none;
  transition:opacity .3s ease, transform .3s ease;
}
.aes-fab-hint::after{ content:""; position:absolute; right:-5px; top:50%; margin-top:-5px;
  border:5px solid transparent; border-left-color:var(--aes-ink); }
.aes-fab-hint.show{ opacity:1; transform:translateX(0); }
@media(max-width:680px){ .aes-fab-hint{ display:none; } }

/* ---------------- Panel ---------------- */
.aes-overlay{
  position:fixed; inset:0; z-index:9001; background:rgba(14,22,34,.28);
  backdrop-filter:saturate(140%) blur(2px);
  opacity:0; pointer-events:none; transition:opacity .2s ease;
}
.aes-overlay.open{ opacity:1; pointer-events:auto; }

.aes-panel{
  position:fixed; right:24px; bottom:92px; z-index:9002;
  width:340px; max-width:calc(100vw - 32px);
  background:var(--aes-panel); border:1px solid var(--aes-line); border-radius:18px;
  box-shadow:var(--aes-shadow); overflow:hidden;
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color:var(--aes-ink);
  opacity:0; transform:translateY(10px) scale(.98); transform-origin:bottom right;
  pointer-events:none; transition:opacity .2s ease, transform .2s ease;
}
.aes-panel.open{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
/* When invoked from an in-player button, the panel centers as a modal */
.aes-panel.aes-modal{ right:50%; bottom:50%; transform:translate(50%,50%) scale(.98); transform-origin:center; }
.aes-panel.aes-modal.open{ transform:translate(50%,50%) scale(1); }
@media(max-width:680px){
  .aes-panel{ right:8px; left:8px; bottom:80px; width:auto; }
  .aes-panel.aes-modal{ right:8px; left:8px; bottom:auto; top:50%; transform:translateY(-50%) scale(.98); }
  .aes-panel.aes-modal.open{ transform:translateY(-50%) scale(1); }
}

.aes-head{ display:flex; align-items:flex-start; gap:12px; padding:18px 18px 12px; }
.aes-head .aes-emblem{ width:38px; height:24px; flex:none; margin-top:2px; }
.aes-head h3{ margin:0; font-family:"Space Grotesk","Inter",sans-serif; font-weight:600; font-size:15.5px; letter-spacing:-.01em; }
.aes-head p{ margin:3px 0 0; font-size:12.5px; color:var(--aes-muted); line-height:1.4; }
.aes-close{ margin-left:auto; flex:none; background:none; border:none; cursor:pointer;
  color:var(--aes-muted); padding:4px; border-radius:8px; line-height:0; }
.aes-close:hover{ background:#F1FAFC; color:var(--aes-ink); }
.aes-close svg{ width:18px; height:18px; }

.aes-body{ padding:4px 14px 8px; max-height:60vh; overflow-y:auto; }
.aes-group{ margin:6px 0 12px; }
.aes-group > span{ display:block; font-size:10.5px; font-weight:700; letter-spacing:.12em;
  text-transform:uppercase; color:var(--aes-muted); padding:0 4px 7px; }
.aes-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:4px; }

.aes-item{ display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:10px 4px; border:none; background:none; cursor:pointer; border-radius:12px;
  color:var(--aes-ink-2); font:500 11px/1.15 "Inter",system-ui,sans-serif; text-align:center;
  transition:background .14s ease, transform .12s ease; text-decoration:none; }
.aes-item:hover{ background:#F4FDFF; transform:translateY(-1px); }
.aes-item .aes-ic{ width:40px; height:40px; border-radius:12px; display:flex; align-items:center;
  justify-content:center; color:#fff; box-shadow:var(--aes-shadow-sm); }
.aes-item .aes-ic svg{ width:21px; height:21px; }

.aes-foot{ border-top:1px solid var(--aes-line); padding:11px 16px 14px; }
.aes-copy{ display:flex; align-items:center; gap:9px; width:100%; cursor:pointer;
  border:1px solid var(--aes-line); background:#FAFEFF; border-radius:11px; padding:11px 13px;
  font:600 13px/1 "Inter",system-ui,sans-serif; color:var(--aes-ink); transition:border-color .14s, background .14s; }
.aes-copy:hover{ border-color:var(--aes-blue); background:#fff; }
.aes-copy svg{ width:17px; height:17px; color:var(--aes-muted); flex:none; }
.aes-copy .aes-url{ flex:1; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-weight:500; color:var(--aes-ink-2); font-size:12px; }
.aes-copy .aes-copylabel{ flex:none; color:var(--aes-blue); }
.aes-copy.copied{ border-color:var(--aes-green); }
.aes-copy.copied .aes-copylabel{ color:var(--aes-green); }

.aes-native{ margin-top:8px; }

/* ---------------- In-player share button ---------------- */
.aes-playbtn{ display:inline-flex; align-items:center; gap:8px; cursor:pointer;
  border:1px solid var(--aes-line); background:#fff; border-radius:30px; padding:9px 16px;
  font:600 13px/1 "Inter",system-ui,sans-serif; color:var(--aes-ink); transition:border-color .14s, transform .12s; }
.aes-playbtn:hover{ border-color:var(--aes-blue); transform:translateY(-1px); }
.aes-playbtn svg{ width:16px; height:16px; }
.aes-playbtn .aes-ts{ color:var(--aes-muted); font-weight:500; }

@media(prefers-reduced-motion:reduce){
  .aes-fab, .aes-panel, .aes-overlay, .aes-item, .aes-fab-hint, .aes-fab .aes-ring .aes-prog{ transition:none !important; }
  .aes-fab[aria-expanded="true"]{ transform:none; }
}
