/*!
 * SoccerPapi League Hubs
 * Unified, mobile-first styling for competition pages.
 */

:root{
  --league-header:70px;
}

body.league-page{
  font-family:var(--font-sans,'Barlow Semi Condensed',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif);
  background:var(--page,#0B1426);
  color:var(--ink,#fff);
  min-height:100vh;
  --page-chrome-height:var(--league-header);
}

.btn-ghost{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#e6eef7;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease;
}

.btn-ghost:hover,
.btn-ghost:focus-visible{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.24);
}

main{
  width:100%;
  max-width:var(--shell-max);
  margin:0 auto;
  padding:calc(var(--page-chrome-height) + env(safe-area-inset-top) + 10px) var(--shell-pad) calc(96px + env(safe-area-inset-bottom));
  box-sizing:border-box;
}

.main-layout{
  display:grid;
  gap:var(--card-gap);
}

@media(min-width:1080px){
  .main-layout{
    grid-template-columns:minmax(0,1fr) 300px;
    align-items:start;
  }
}

.main-content{
  display:grid;
  gap:var(--section-gap);
}

.aside-ads{
  display:none;
}

@media(min-width:1080px){
  .aside-ads{
    display:block;
    position:sticky;
    top:calc(var(--page-chrome-height) + 16px);
  }
}

.aside-ads__card{
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(8,15,28,.92);
  padding:14px;
  box-shadow:var(--shadow-soft);
}

.aside-ads__label{
  margin:0 0 8px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#9fb2d3;
}

.aside-ads__slot{
  width:100%;
  min-height:320px;
}

.aside-ads__slot ins.adsbygoogle{
  display:block;
  width:100%;
  min-height:600px;
}

.hero{
  display:grid;
  gap:14px;
  padding:18px;
  border-radius:18px;
  background:var(--surface,#0E1C33);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:var(--shadow-strong);
}

@media(min-width:720px){
  .hero{
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
  }
}

.hero-heading{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex-wrap:wrap;
}

.league-logo{
  width:40px;
  height:40px;
  object-fit:contain;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

.hero h1{
  margin:0;
  font-size:clamp(22px,3.6vw,30px);
  font-weight:700;
}

.meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:#dfe7f2;
  font-weight:600;
  font-size:13.5px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:#E6F7FF;
  padding:8px 10px;
  border-radius:12px;
  font-weight:600;
  white-space:nowrap;
}

.badge-select{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.05);
}

.badge-select select{
  appearance:none;
  background:rgba(15,31,54,.55);
  border:1px solid rgba(255,255,255,.16);
  color:#e9f2ff;
  border-radius:10px;
  padding:6px 30px 6px 10px;
  font-size:13px;
  font-family:inherit;
  cursor:pointer;
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3e%3cpath fill='%23E6F2FF' d='M0 0h9L4.5 5z'/%3e%3c/svg%3e");
  background-repeat:no-repeat;
  background-position:right 8px center;
  background-size:9px 5px;
}

.badge-select select option{
  color:#0b1426;
  background:#f1f5ff;
}

.flag{
  width:18px;
  height:14px;
  border-radius:3px;
  object-fit:cover;
  box-shadow:0 0 0 1px rgba(255,255,255,.18);
}

.hero p{
  margin:0;
  color:#cfe0f8;
  line-height:1.6;
}

.hero__intro{
  margin:4px 0 0;
  color:#cfe0f8;
  line-height:1.6;
}

section.sec{
  margin:0;
}

section.sec h2{
  margin:0 0 8px;
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#cbd6ea;
}

.block{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  overflow:hidden;
  background:rgba(15,24,46,.9);
  box-shadow:var(--shadow-soft);
}

.sec[data-panel="details"] .block + .block{
  margin-top:12px;
}

.block h3{
  margin:0;
  padding:12px 14px;
  font-size:13px;
  color:#e9eef7;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(91,192,235,.10);
  font-weight:600;
  letter-spacing:.04em;
}

.pad{
  padding:12px 14px;
}

.empty{
  padding:16px;
  text-align:center;
  color:#b9c7dc;
  background:rgba(255,255,255,.03);
  border-radius:12px;
  border:1px dashed rgba(255,255,255,.14);
}

.matches{
  display:grid;
  gap:10px;
}

.match{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}

.club{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.crest{
  width:28px;
  height:28px;
  object-fit:contain;
}

.name{
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.center{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  min-width:82px;
}

.kick{
  font-weight:600;
  color:#e8f0ff;
}

.score{
  font-weight:700;
  font-variant-numeric:tabular-nums;
}

.link{
  color:#cfe4ff;
  text-decoration:none;
  font-weight:600;
}

.link:hover{
  text-decoration:underline;
}

.team-link{
  text-decoration:none;
  color:#fff!important;
  font-weight:600;
}

.team-link:hover{
  text-decoration:underline;
}

.table-wrap{
  overflow:auto;
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:9px 8px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:13px;
  text-align:center;
}

.table thead th{
  position:sticky;
  top:0;
  background:#13274a;
  color:#e6eef7;
  border-bottom:1px solid rgba(255,255,255,.10);
  z-index:2;
}

.table td.team{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
}

.table th:first-child,
.table td:first-child{
  text-align:left;
  padding-left:10px;
}

.table th:nth-child(2){
  text-align:left;
}

.team-flex{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.team-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rank-cell{
  display:flex;
  align-items:center;
  gap:6px;
}

.qual-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
  letter-spacing:.03em;
  padding:2px 6px;
  border-radius:999px;
  text-transform:uppercase;
}

.qual-tag.qual-ucl{background:rgba(91,192,235,.2);color:#dff4ff}
.qual-tag.qual-uel{background:rgba(245,158,11,.18);color:#fff7e6}
.qual-tag.qual-uecl{background:rgba(45,212,191,.18);color:#e0f7ff}
.qual-tag.qual-playoff{background:rgba(248,113,113,.2);color:#ffe6e6}
.qual-tag.qual-relegation{background:rgba(239,68,68,.24);color:#ffe6e6}

@media(max-width:640px){
  .qual-tag{
    display:none;
  }
}

.table tr.ucl{background:rgba(91,192,235,.05);box-shadow:inset 4px 0 0 rgba(91,192,235,.8)}
.table tr.uel{background:rgba(245,158,11,.05);box-shadow:inset 4px 0 0 rgba(245,158,11,.75)}
.table tr.uecl{background:rgba(45,212,191,.05);box-shadow:inset 4px 0 0 rgba(45,212,191,.75)}
.table tr.playoff{background:rgba(248,113,113,.05);box-shadow:inset 4px 0 0 rgba(248,113,113,.75)}
.table tr.relegation{background:rgba(239,68,68,.10);box-shadow:inset 4px 0 0 rgba(239,68,68,.85)}

.qual-legend{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:10px;
  font-size:12px;
  color:#c4d4ee;
}

.qual-legend span{
  display:flex;
  align-items:center;
  gap:6px;
}

.qual-swatch{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
}

.qual-swatch.ucl{background:#5BC0EB}
.qual-swatch.uel{background:#F59E0B}
.qual-swatch.uecl{background:#2DD4BF}
.qual-swatch.playoff{background:#F87171}
.qual-swatch.relegation{background:#EF4444}

.form{
  display:inline-flex;
  gap:4px;
}

.chip{
  display:inline-block;
  min-width:18px;
  height:18px;
  line-height:18px;
  border-radius:4px;
  font-size:11px;
  font-weight:700;
  text-align:center;
}

.win{background:#86efac;color:#0b1426}
.draw{background:#e5e7eb;color:#0b1426}
.lose{background:#fecaca;color:#0b1426}

.grid{
  display:grid;
  gap:10px;
  align-items:start;
}

@media(min-width:900px){
  .grid{
    grid-template-columns:1fr 1fr;
  }
  .row.is-hidden:nth-child(n+6){
    display:none;
  }
}

.list{
  list-style:none;
  margin:0;
  padding:0;
}

.row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}

.num{
  font-weight:600;
  width:22px;
  text-align:center;
}

.player-name{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.right{
  margin-left:auto;
  font-weight:600;
}

.avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
}

.avatar.placeholder{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:#aebdd4;
}

.more-btn{
  display:block;
  margin:10px auto 2px;
  background:none;
  border:none;
  color:#dce6f5;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  padding:0;
  text-align:center;
}

.seo-copy{
  font-size:13.5px;
  line-height:1.6;
  color:#c7d3ea;
}

.seo-copy h2{
  margin:0 0 10px;
  font-size:18px;
  color:#f1f5ff;
}

.seo-copy p{
  margin:0 0 12px;
}

.seo-copy ul{
  margin:0 0 12px;
  padding-left:18px;
}

.seo-copy li{
  margin-bottom:6px;
}

.seo-copy a{
  color:#79d7f2;
}

.seo-copy a:hover{
  text-decoration:underline;
}

.faq{
  background:rgba(12,24,44,.7);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:14px;
}

.faq h2{
  margin:0 0 10px;
  font-size:18px;
  color:#f6f9ff;
}

.faq-item{
  border-top:1px solid rgba(255,255,255,.08);
  padding:14px 0;
}

.faq-item:first-of-type{
  border-top:none;
  padding-top:0;
}

.faq-item h3{
  margin:0 0 6px;
  font-size:15px;
  color:#e6f1ff;
}

.faq-item p{
  margin:0;
  color:#c6d4eb;
}

.sk{
  position:relative;
  overflow:hidden;
  background:rgba(255,255,255,.06);
  border-radius:10px;
}

.sk::after{
  content:"";
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:rgba(255,255,255,.10);
  animation:shimmer 1.2s infinite;
}

@keyframes shimmer{
  100%{transform:translateX(100%)}
}

.mobile-adbar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:30;
  background:rgba(11,20,38,.96);
  border-top:1px solid rgba(255,255,255,.08);
  padding:6px 10px calc(env(safe-area-inset-bottom) + 10px);
  display:none;
  box-shadow:0 -10px 24px rgba(0,0,0,.38);
}

.mobile-adbar__inner{
  max-width:520px;
  margin:0 auto;
}

.mobile-adbar__slot{
  width:100%;
  max-width:520px;
  margin:0 auto;
}

.mobile-adbar ins.adsbygoogle{
  display:block!important;
  width:100%;
  height:65px;
}

@media(max-width:900px){
  .mobile-adbar{
    display:block;
  }
}
