/*!
 * SoccerPapi Core Styles
 * Shared tokens, reset, layout utilities, and page-chrome skin.
 */

:root{
  --bg:#0B1426;
  --page:#0B1426;
  --surface:#0E1C33;
  --surface-2:#10223D;
  --line:#1E3356;
  --ink:#FFFFFF;
  --muted:#B8C6D9;
  --accent1:#F5FF6B;
  --accent2:#5BC0EB;
  --hover:#79D7F2;
  --danger:#ef4444;
  --crimson:#FF0066;
  --round:14px;
  --small:13px;
  --base:14.5px;
  --tight:0.2px;
  --row-h:56px;
  --header-h:0px;
  --bnav-h:56px;
  --page-chrome-height:70px;
  --shadow-card:0 18px 40px rgba(0,0,0,.35);
  --font-sans:'Barlow Semi Condensed',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --font-mono:'SFMono-Regular',Consolas,Menlo,monospace;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
  height:100%;
  overflow-x:hidden;
}

body{
  font-family:var(--font-sans);
  font-size:var(--base);
  letter-spacing:var(--tight);
  background:var(--page);
  color:var(--ink);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-weight:400;
}

img,
svg{
  max-width:100%;
  display:block;
}

strong,
b{
  font-weight:600;
}

a{
  color:var(--ink);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

.sr-only{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* Page chrome */
.page-chrome{
  width:100%;
  margin:0;
  background:var(--bg,#0B1426);
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 1px 10px rgba(0,0,0,.35);
  z-index:20;
  font-family:var(--font-sans);
  font-size:17px;
  letter-spacing:.02em;
}

.page-chrome__bar{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
  padding-top:calc(8px + env(safe-area-inset-top));
  padding-bottom:8px;
  height:calc(var(--page-chrome-height) + env(safe-area-inset-top));
}

.page-chrome__back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:inherit;
  font-size:16px;
  text-decoration:none;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
}

.page-chrome__back:hover,
.page-chrome__back:focus-visible{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.32);
}

.page-chrome__back-icon{
  font-size:16px;
  line-height:1;
}

.page-chrome__brand{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  font-size:17px;
  letter-spacing:.02em;
}
.page-chrome__brand a{
  color:var(--ink,#fff);
  text-decoration:none;
}

.page-chrome__brand em{
  font-style:normal;
  color:var(--accent1);
}

.page-chrome__meta{
  margin-left:auto;
  padding-left:12px;
  font-size:12.5px;
  color:var(--muted,#cfe0f8);
  white-space:nowrap;
}

.page-chrome__actions{
  display:flex;
  gap:8px;
  margin-left:auto;
}

.page-chrome__actions button,
.page-chrome__actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:inherit;
  cursor:pointer;
}

.page-chrome--fixed{
  position:fixed;
  inset:0 0 auto 0;
}

.page-chrome--sticky{
  position:sticky;
  top:0;
}

.page-chrome--card{
  position:relative;
  background:transparent;
  box-shadow:none;
  margin-bottom:20px;
}

.page-chrome--card .page-chrome__bar{
  padding:0;
  min-height:unset;
}

/* Static content layout */
body.page-static{
  min-height:100vh;
  padding:clamp(24px,4vw,48px) clamp(16px,4vw,32px);
  display:flex;
  flex-direction:column;
  align-items:center;
  background:var(--bg);
  color:var(--ink);
}

body.page-static > *{
  width:100%;
}

.page-static .content-wrap{
  width:100%;
  max-width:960px;
}

.content-wrap--narrow{
  max-width:560px;
}

.content-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--round);
  padding:clamp(20px,4vw,44px);
  box-shadow:var(--shadow-card);
}

.content-header{
  margin-bottom:24px;
}

.content-header h1{
  margin:0 0 12px 0;
  font-size:clamp(26px,3vw,36px);
  font-weight:600;
  color:var(--accent1);
}

.content-lede{
  margin:0;
  color:var(--muted);
  line-height:1.65;
  font-size:15px;
}

.content-section{
  margin:26px 0;
}

.content-section h2{
  font-size:clamp(18px,2vw,24px);
  margin:0 0 12px;
  color:#e6eef7;
  font-weight:600;
}

.content-section p,
.content-section li{
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
}

.content-section ul{
  margin:12px 0 0 20px;
  padding:0;
}

code{
  background:rgba(255,255,255,.06);
  padding:2px 4px;
  border-radius:4px;
  font-family:var(--font-mono);
  font-size:13px;
}

.content-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.content-grid .card{
  background:var(--surface-2);
  border:1px solid rgba(255,255,255,.12);
  border-radius:var(--round);
  padding:18px;
  box-shadow:0 14px 30px rgba(0,0,0,.35);
}

.content-grid .card a{
  color:var(--ink);
  text-decoration:none;
  font-weight:500;
  display:flex;
  align-items:center;
  gap:10px;
}

.content-grid .card a:hover{
  color:var(--accent1);
}

.page-leagues .content-grid .card a{
  color:var(--ink);
}

.page-leagues .content-grid .card a:hover{
  color:var(--ink);
  text-decoration:underline;
}

.content-links{
  display:grid;
  gap:8px;
  margin-top:18px;
}

.content-links a{
  color:var(--ink);
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}

.content-links a:hover{
  background:rgba(255,255,255,.12);
}

.content-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}

.content-actions a{
  color:var(--ink);
  padding:10px 16px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}

.content-actions a:hover{
  background:rgba(255,255,255,.12);
}

.content-note{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px;
  color:var(--muted);
  font-size:14px;
}

.page-message{
  max-width:720px;
  margin:32px auto 12px;
  padding:16px;
  text-align:center;
  color:var(--muted);
}

.redirect-card{
  max-width:720px;
  margin:24px auto;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--round);
  padding:18px;
  box-shadow:var(--shadow-card);
  text-align:center;
}

.redirect-card p{
  margin:0;
  color:var(--muted);
}

body.page-static .site-footer,
body.has-core-footer .site-footer{
  width:100%;
  margin-top:40px;
  padding:32px clamp(16px,4vw,32px) 28px;
  border-top:1px solid var(--line);
  background:var(--surface);
  color:var(--muted);
}

body.page-static .footer-grid,
body.has-core-footer .footer-grid{
  display:grid;
  gap:18px;
  max-width:960px;
  margin:0 auto;
}

@media(min-width:720px){
  body.page-static .footer-grid,
  body.has-core-footer .footer-grid{
    grid-template-columns:2fr 1fr;
    align-items:start;
  }
}

body.page-static .footer-title,
body.has-core-footer .footer-title{
  margin:0 0 8px;
  font-size:18px;
  font-weight:600;
  color:var(--ink);
}

body.page-static .footer-text,
body.has-core-footer .footer-text{
  margin:0 0 10px;
  font-size:14px;
  line-height:1.6;
  color:var(--muted);
}

body.page-static .footer-links,
body.has-core-footer .footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

body.page-static .footer-links a,
body.has-core-footer .footer-links a{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:var(--ink);
  font-size:13px;
}

body.page-static .footer-links a:hover,
body.has-core-footer .footer-links a:hover{
  background:rgba(255,255,255,.12);
}

/* Funding Choices privacy control — keep it docked near the nav so it never hides content */
:is(
  iframe[title*="Privacy and cookie settings" i],
  iframe[title*="Privacy & cookie settings" i],
  [aria-label*="Privacy and cookie settings" i]
){
  position:fixed !important;
  top:auto !important;
  right:auto !important;
  left:calc(12px + env(safe-area-inset-left)) !important;
  bottom:calc(var(--bnav-h) + 12px + env(safe-area-inset-bottom)) !important;
  width:auto !important;
  max-width:320px !important;
  transform:none !important;
  margin:0 !important;
  z-index:32 !important;
  pointer-events:auto !important;
}

@media(min-width:768px){
  :is(
    iframe[title*="Privacy and cookie settings" i],
    iframe[title*="Privacy & cookie settings" i],
    [aria-label*="Privacy and cookie settings" i]
  ){
    left:calc(24px + env(safe-area-inset-left)) !important;
    bottom:calc(20px + env(safe-area-inset-bottom)) !important;
  }
}
