/*!
 * SoccerPapi Player Profiles
 * Hero-driven layout crafted to match the league hubs.
 */

:root{
  --player-round:18px;
  --player-surface:rgba(11,20,38,0.85);
  --player-max:1200px;
}

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

.hero--player{
  background:var(--surface);
  border-radius:22px;
  border:1px solid var(--line, rgba(255,255,255,.1));
  box-shadow:var(--shadow-strong);
  padding:24px;
}

.hero__subheading{
  margin:0;
  font-size:14px;
  color:var(--muted);
  letter-spacing:.04em;
}

.hero--player .hero-top{
  display:flex;
  flex-direction:column;
  gap:0;
}

.hero--player .hero-heading{
  display:flex;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
}

.player-hero__photo{
  width:120px;
  height:120px;
  border-radius:26px;
  object-fit:cover;
  box-shadow:0 14px 28px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.15);
  background:#071029;
}

.player-hero__meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.player-hero__meta--details{
  justify-content:flex-end;
  gap:8px;
}

.player-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.player-tag{
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  background:var(--surface-2, rgba(255,255,255,.06));
  border:1px solid var(--line, rgba(255,255,255,.12));
}

.block__eyebrow{
  margin:0;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(255,255,255,.64);
}

.block__header--inline{
  align-items:flex-start;
}

.player-form__body{
  display:grid;
  gap:12px;
  padding-right:0;
}

.player-form__timeline-wrap{
  margin:0;
  padding:2px 0 6px;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  overflow:hidden;
}
.player-form__timeline{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  gap:10px;
  min-width:0;
  width:100%;
  flex-wrap:nowrap;
  overflow-x:auto;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}
.player-form__timeline::-webkit-scrollbar{
  display:none;
}
.player-form__timeline li{
  flex:0 0 150px;
  min-width:150px;
  border-radius:18px;
  padding:14px 12px;
  background:var(--surface-2, rgba(255,255,255,.06));
  border:1px solid var(--line, rgba(255,255,255,.12));
  display:flex;
  flex-direction:column;
  scroll-snap-align:center;
  box-shadow:0 10px 22px rgba(0,0,0,.28);
  transition:transform .12s ease, border-color .12s ease;
}
.player-form__timeline li:hover{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.22);
}
.player-form__item{
  display:grid;
  gap:10px;
  text-decoration:none;
  color:inherit;
  height:100%;
}
.player-form__item:hover{
  text-decoration:none;
  color:inherit;
}
.player-form__opponent{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.player-form__score-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.player-form__match-label{
  font-size:14px;
  font-weight:600;
}
.player-form__score{
  font-size:13px;
  letter-spacing:.1em;
}
.player-form__timeline small{
  font-size:12px;
  color:rgba(255,255,255,.62);
  display:block;
}
.player-form__empty{
  margin:0;
}

button.form-more{
  width:100%;
  border:1px solid var(--line, rgba(255,255,255,.12));
  background:var(--surface-2, rgba(255,255,255,.04));
  color:var(--muted);
  border-radius:14px;
  padding:12px;
  font-weight:700;
  cursor:pointer;
}
button.form-more:hover{
  border-color:rgba(255,255,255,.22);
  color:#e6f1ff;
}

/* Rating pills (match page palette) */
.sp-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.2);
  font-size:13px;
  font-weight:700;
  line-height:1.1;
  min-width:40px;
  justify-self:center;
}
.bench-pill{
  text-transform:uppercase;
  letter-spacing:.08em;
}
.pill-gray  { color:#cbd5e1; background:transparent; }
.pill-red   { color:#fff; background:#ef4444; }
.pill-amber { color:#0b1426; background:#f59e0b; }
.pill-green { color:#0b1426; background:#22c55e; }
.pill-bright{ color:#0b1426; background:#34d399; }

.sec.player-form{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow-x:hidden;
}

@media(max-width:720px){
  .sec.player-form{
    margin-left:auto;
    margin-right:auto;
  }
  .sec.player-form .block{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
}

.stat-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
}

.stat-card{
  border:1px solid var(--line, rgba(255,255,255,.12));
  border-radius:16px;
  padding:16px;
  background:var(--surface-2, rgba(15,24,46,.92));
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:90px;
  box-shadow:var(--shadow-soft);
}

.stat-card__label{
  display:block;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(255,255,255,.58);
  font-weight:700;
}

.stat-card__value{
  font-size:26px;
  letter-spacing:.01em;
  font-weight:700;
  color:#ffffff;
  line-height:1.2;
  text-transform:none;
  display:block;
}

/* Override generic team styles for player stat cards */
body.player-page .stat-card__label{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(255,255,255,.58);
  font-weight:700;
}
body.player-page .stat-card__value{
  font-size:26px;
  letter-spacing:.01em;
  font-weight:700;
  color:#ffffff;
  line-height:1.2;
}

.block__header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  padding:14px 16px;
  border-bottom:1px solid var(--line, rgba(255,255,255,.1));
  background:var(--surface-2, rgba(255,255,255,.04));
  gap:12px;
}
.block__header h3{
  margin:2px 0 0;
  font-size:15px;
  letter-spacing:.02em;
}
.block__header p{
  margin:0;
}

.player-hero__bio{
  margin-top:12px;
  padding:10px 12px;
  display:flex;
  flex-direction:row;
  align-items:center;
  flex-wrap:wrap;
  gap:10px 12px;
  background:var(--surface-2, rgba(255,255,255,.04));
  border:1px solid var(--line, rgba(255,255,255,.1));
  border-radius:16px;
}

.player-hero__bio .player-tags{
  gap:8px;
}

.player-bio{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.player-bio li{
  flex:1 1 0;
  min-width:0;
  padding:8px 9px;
  border-radius:12px;
  background:var(--surface-2, rgba(255,255,255,.04));
  border:1px solid var(--line, rgba(255,255,255,.1));
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
}
@media(max-width:640px){
  .player-hero__bio{
    padding:10px;
    gap:8px;
    flex-direction:column;
    align-items:flex-start;
  }
  .player-bio li{
    min-width:140px;
    flex:1 1 140px;
  }
}

@media(min-width:900px){
  .player-bio{
    flex-wrap:nowrap;
  }
}
.player-bio a{
  color:inherit;
  text-decoration:none;
  font-weight:700;
}
.player-bio a:hover{
  text-decoration:underline;
}
.player-link-inline{
  color:inherit;
  text-decoration:underline;
}
.player-bio__label{
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(255,255,255,.6);
  font-weight:700;
  display:block;
}
.player-bio__value{
  font-weight:700;
  font-size:15px;
  letter-spacing:.02em;
  color:#eaf2ff;
}

.player-panels__grid{
  display:grid;
  gap:14px;
}

.block--bio{
  background:var(--surface-2, rgba(12,24,46,.9));
  border:1px solid var(--line, rgba(255,255,255,.08));
}

.empty-state{
  padding:18px;
  text-align:center;
  border-radius:14px;
  background:var(--surface);
  border:1px dashed var(--line, rgba(255,255,255,.18));
  font-size:14px;
  color:var(--muted);
}
.player-live-gate{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
  text-align:left;
}
.player-live-gate__text{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.player-live-btn{
  border:1px solid var(--line, rgba(255,255,255,.18));
  background:rgba(91,192,235,.16);
  color:#e6f7ff;
  padding:8px 14px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
}
.player-live-btn:hover{
  background:rgba(91,192,235,.24);
}
.player-live-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.transfer-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}
.transfer-item{
  padding:12px;
  border-radius:12px;
  border:1px solid var(--line, rgba(255,255,255,.12));
  background:var(--surface-2, rgba(255,255,255,.04));
  display:grid;
  gap:6px;
}
.transfer-main{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
}
.transfer-team{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.transfer-name{
  font-weight:700;
}
.transfer-logo{
  width:26px;
  height:26px;
  border-radius:8px;
  object-fit:contain;
  background:var(--surface);
  border:1px solid var(--line, rgba(255,255,255,.12));
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}
.transfer-arrow{
  color:var(--muted);
}
.transfer-meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:13px;
  color:var(--muted);
}
.transfer-fee{
  font-weight:700;
  color:#e6f1ff;
}

.club-history-row{
  gap:12px;
}
.club-history-team{
  color:inherit;
  text-decoration:none;
  font-weight:600;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.club-history-team:hover{
  text-decoration:underline;
}
.club-history-season{
  color:var(--muted);
  font-weight:600;
  white-space:nowrap;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

@media(max-width:720px){
  .hero--player{
    padding:18px;
  }
  .hero--player .hero-heading{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
  .player-tags{
    justify-content:center;
  }
  .player-hero__meta--details{
    justify-content:flex-start;
  }
}

#playerMain.is-loading{
  opacity:.6;
}
