/* public/gta-share-top5.css - the "Share Top 5" button in the top bar and its menu (public/gta-share-top5.mjs, owner 17.11.2026).
   In the top bar because that is the one place visible without scrolling at every width, phones included: the KPI strip and
   the race block sit under the hero banner, which fills a phone's first screen. On the site gate's allow-list
   (evm/core/screener/site-gate.mjs) and in the nginx public location. */
.ls-share5-wrap { position:relative; display:inline-flex; flex:none; order:4 }
.ls-share5-btn { display:inline-flex; align-items:center; gap:8px; height:40px; box-sizing:border-box; padding:0 13px; border:1px solid #ff72bc;
  border-radius:10px; background:linear-gradient(115deg,#f52c93,#c3127a); color:#fff; font:700 13px/1 var(--ui,'Segoe UI',system-ui,sans-serif);
  white-space:nowrap; cursor:pointer; box-shadow:0 0 18px #f52c9338, inset 0 1px 0 #ffffff33 }
.ls-share5-btn:hover, .ls-share5-btn[aria-expanded="true"] { background:linear-gradient(115deg,#ff4aa6,#d01a86) }
.ls-share5-btn:focus-visible { outline:2px solid var(--ls-cyan,#36d7e8); outline-offset:3px }
.ls-share5-btn svg { width:15px; height:15px; flex:none }
/* The menu is a dialog (owner, 17.11.2026: "make the share menu bigger"): centred, over the page dimmed by its own shadow, the card
   up to 560 px wide. It is moved to <body> on mount (gta-share-top5.mjs), so nothing in the top bar clips or covers it. */
html.ls-share5-open { overflow:hidden }
.ls-share5-panel { position:fixed; z-index:2000; top:50%; left:50%; transform:translate(-50%,-50%); width:min(608px, calc(100vw - 32px));
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; box-sizing:border-box; padding:20px 24px 22px;
  border:1px solid #2c3944; border-radius:16px; background:#0d141b; color:#edf1f3;
  box-shadow:0 0 0 100vmax rgba(3,6,10,.74), 0 30px 80px rgba(0,0,0,.6); font:15px/1.45 var(--ui,'Segoe UI',system-ui,sans-serif); text-align:left }
.ls-share5-panel[hidden] { display:none }
.ls-share5-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px }
.ls-share5-head b { font:400 26px/1.1 var(--ls-display,'Anton',Impact,sans-serif); letter-spacing:.5px; text-transform:uppercase }
.ls-share5-close { flex:none; width:40px; height:40px; border:1px solid #2c3944; border-radius:10px; background:none; color:inherit; font:24px/1 system-ui,sans-serif; cursor:pointer }
.ls-share5-close:hover { border-color:#725065; background:#1d202b }
/* The card's box keeps the card's square shape from the first frame. Until the picture has loaded it is a placeholder in the
   card's own colours (a header bar and five rows), and the <img> stays transparent, so neither an empty box nor the alt text
   is ever shown. */
.ls-share5-card { position:relative; width:min(100%, 560px, calc(100vh - 300px)); width:min(100%, 560px, calc(100dvh - 300px)); min-width:min(100%, 240px);
  aspect-ratio:1; margin:0 auto; border-radius:12px; border:1px solid #3a2550; overflow:hidden; box-sizing:border-box;
  background:linear-gradient(#120727,#3c1146) }
.ls-share5-card::before { content:""; position:absolute; inset:6% 6% 6% 6%; border-radius:4px; opacity:.9;
  background:
    linear-gradient(90deg,#ffffff 0 34%,#ff2d95 34% 58%,transparent 58%) 0 0/100% 7% no-repeat,
    linear-gradient(#ff2d95,#ff2d95) 0 16.5%/100% .4% no-repeat,
    linear-gradient(#2b1544,#2b1544) 0 25%/100% 12% no-repeat,
    linear-gradient(#2b1544,#2b1544) 0 40.5%/100% 12% no-repeat,
    linear-gradient(#2b1544,#2b1544) 0 56%/100% 12% no-repeat,
    linear-gradient(#2b1544,#2b1544) 0 71.5%/100% 12% no-repeat,
    linear-gradient(#2b1544,#2b1544) 0 87%/100% 12% no-repeat }
.ls-share5-card::after { content:""; position:absolute; inset:0; background:linear-gradient(100deg,transparent 30%,#ffffff12 50%,transparent 70%) -100% 0/200% 100% no-repeat;
  animation:ls-share5-shimmer 1.2s linear infinite }
.ls-share5-card[data-state="ready"]::before, .ls-share5-card[data-state="ready"]::after, .ls-share5-card[data-state="failed"]::after { display:none }
@keyframes ls-share5-shimmer { to { background-position:200% 0 } }
.ls-share5-card img { position:relative; z-index:1; display:block; width:100%; height:100%; opacity:0; transition:opacity .12s ease-out; color:transparent }
.ls-share5-card[data-state="ready"] img { opacity:1 }
.ls-share5-card[data-state="failed"] img { display:none }
.ls-share5-status { min-height:0; margin:8px 0 0; color:#a0afbc; font-size:14px; text-align:center }
.ls-share5-status:empty { display:none }
.ls-share5-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px }
.ls-share5-act { flex:1 1 140px; display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:0 14px; box-sizing:border-box;
  border:1px solid #304452; border-radius:11px; background:#0d1d26; color:#e7eef3; font:700 15px/1.1 var(--ui,'Segoe UI',system-ui,sans-serif); text-align:center;
  text-decoration:none; cursor:pointer }
.ls-share5-act[hidden] { display:none }
.ls-share5-act:hover { border-color:#725065; background:#1d202b }
.ls-share5-primary { flex-basis:100%; min-height:52px; font-size:16px; border-color:#ff72bc; background:linear-gradient(115deg,#f52c93,#c3127a); color:#fff }
.ls-share5-primary:hover { background:linear-gradient(115deg,#ff4aa6,#d01a86) }
.ls-share5-act:focus-visible, .ls-share5-close:focus-visible { outline:2px solid var(--ls-cyan,#36d7e8); outline-offset:2px }
.ls-share5-note { margin:14px 0 0; color:#8796a3; font-size:13px; text-align:center }
html[data-gta-theme="light"] .ls-share5-panel { border-color:#d3dce3; background:#fff; color:#182731; box-shadow:0 0 0 100vmax rgba(20,30,45,.55), 0 22px 60px rgba(20,40,60,.18) }
html[data-gta-theme="light"] .ls-share5-act:not(.ls-share5-primary) { border-color:#c9d4dc; background:#f3f6f8; color:#182731 }
html[data-gta-theme="light"] .ls-share5-close { border-color:#c9d4dc }
html[data-gta-theme="light"] .ls-share5-note, html[data-gta-theme="light"] .ls-share5-status { color:#55636e }
/* Phones: the button keeps its icon and "Top 5"; the dialog is the full width less 16 px gutters, the card as wide as it allows. */
@media (max-width:599.98px) {
  .ls-share5-btn { height:34px; padding:0 9px; gap:6px; font-size:12px }
  .ls-share5-btn .ls-share5-word { display:none }
  .ls-share5-panel { padding:14px 14px 16px; border-radius:14px }
  .ls-share5-head { margin-bottom:10px }
  .ls-share5-head b { font-size:22px }
  .ls-share5-card { width:min(100%, calc(100vh - 270px)); width:min(100%, calc(100dvh - 270px)) }
}
/* The narrowest phones: the words "Top 5" without the X mark (QA, 18.11.2026: the bare X read as a link to X, not as
   sharing). It is the narrower of the two, so the top bar stays on its rows at 360 px. */
@media (max-width:379.98px) {
  .ls-share5-btn { padding:0 9px; gap:0 }
  .ls-share5-btn svg { display:none }
}
@media (prefers-reduced-motion: reduce) { .ls-share5-btn, .ls-share5-act, .ls-share5-card img { transition:none } .ls-share5-card::after { animation:none } }
