/* ========================================================================
   MATCH PAGE — CLEAN FINAL CSS
   based on:
   1) AFW BASE — global safety / shared UI
   2) AFW MATCH PAGE
   target:
   - new classes from rewritten match.php
   IMPORTANT:
   - visual values preserved
   - duplicates removed
   - syntax cleaned
   ======================================================================== */

/* ========================================================================
   0. GLOBAL SAFETY
   ======================================================================== */

.match-page,
.match-page *{
  box-sizing:border-box;
}

.match-page{
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  padding:0;
}

.match-page img{
  max-width:100%;
  height:auto;
}

.match-head,
.match-head__side,
.match-head__team,
.match-head__center,
.match-meta,
.match-tabs,
.match-summary-stats,
.match-summary-stats__grid,
.match-summary-form,
.match-summary-form__list,
.match-events,
.match-events__list,
.match-lineups,
.match-lineups__col,
.match-lineups-pitch,
.match-lineups-pitch__head,
.match-lineups-pitch__field,
.match-lineups-pitch__field-team,
.match-lineups-pitch__team,
.match-stats,
.match-stats__grid,
.match-player-stats,
.match-player-stats-team,
.match-h2h,
.match-standings,
.match-predictions,
.match-odds{
  min-width:0;
  max-width:100%;
}

@media (max-width:1024px){
  .match-page{
    overflow-x:hidden;
  }
}

/* ========================================================================
   1. SHARED UI
   ======================================================================== */

.match-ui-dot{
  display:inline-block;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#999c9f;
  flex:0 0 auto;
}

.match-ui-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--h5-font-family, var(--h1-font-family));
  font-size:16px;
  line-height:var(--h5-line-height, 1.2);
  font-weight:500;
  color:var(--color-content-heading);
  background:none;
  border:0;
  padding:0;
  box-shadow:none;
  min-width:0;
  max-width:100%;
}

.match-ui-pill strong{
  font-weight:600;
  font-size:12px;
  color:var(--color-content-heading);
}

.match-ui-note{
  display:block;
  width:100%;
  padding:10px 14px;
  text-align:center;
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.92);
  font-size:14px;
  font-weight:600;
  line-height:1.5;
}

.match-form-badges{
  display:flex;
  align-items:center;
  gap:6px;
  max-width:520px;
  overflow:hidden;
}

.match-form-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:22px;
  font-style:normal;
  font-size:14px;
  font-weight:600;
  line-height:1;
  color:#fff;
}

.match-form-badge--win{ background:#16a34a; }
.match-form-badge--loss{ background:#dc2626; }
.match-form-badge--draw{ background:rgba(255,255,255,.22); }
.match-form-badge--unk{ background:rgba(255,255,255,.18); }

/* ========================================================================
   2. HERO
   ======================================================================== */

.match-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  justify-items:center;
  gap:18px;
  padding:18px 0 6px;
}

.match-head__side{
  display:flex;
  align-items:center;
  justify-content:center;
}

.match-head__team-link{
  display:block;
  width:100%;
  max-width:340px;
  min-width:0;
  color:inherit;
  text-decoration:none;
}

.match-head__team-link:hover,
.match-head__team-link:focus,
.match-head__team-link:active{
  color:inherit;
  text-decoration:none;
}

.match-head__team-link:focus-visible{
  outline:none;
}

.no-touch .match-head__team-link:hover .match-head__name{
  color:var(--color-content-primary);
}

.match-head__team{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:100%;
  max-width:340px;
}

.match-head__logo{
  display:flex;
  align-items:center;
  justify-content:center;
  width:56px;
  height:56px;
  flex:0 0 56px;
}

.match-head__logo img{
  display:block;
  width:56px;
  height:56px;
  object-fit:contain;
}

.match-head__name{
  width:100%;
  max-width:320px;
  min-width:0;
  overflow:hidden;
  word-break:break-word;
  text-align:center;
  font-family:var(--h1-font-family);
  font-size:18px;
  line-height:1.15;
  font-weight:600;
  color:var(--color-content-heading);
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

.match-head__center{
  min-width:160px;
  padding:0 6px;
  text-align:center;
}

.match-head__title{
  margin:0 0 6px;
  max-width:100%;
  overflow-wrap:anywhere;
  color:var(--color-content-heading);
  font-family:var(--h1-font-family);
  font-size:44px;
  line-height:1;
  font-weight:700 !important;
}

.match-head__subtitle{
  display:flex;
  justify-content:center;
  gap:10px;
  min-width:0;
  max-width:100%;
  margin:0;
  text-transform:uppercase;
  font-family:var(--h5-font-family);
  font-size:14px;
  line-height:var(--h5-line-height);
  font-weight:600;
  color:rgba(255,255,255,.80);
}

.match-head__subtitle--live .match-head__live{
  color:var(--color-content-heading);
  font-weight:600;
}

.match-head__subtitle--live .match-head__status{
  color:rgba(255,255,255,.75);
}

.match-head__subtitle--live .match-head__live--blink{
  color:#f13031;
  font-weight:600;
  transition:color .2s ease, opacity .2s ease;
  animation:matchLiveBlink 1s ease-in-out infinite;
}

@keyframes matchLiveBlink{
  0%,100%{
    color:#f13031;
    opacity:1;
  }
  50%{
    color:#f13031;
    opacity:.45;
  }
}

/* ========================================================================
   3. MATCH META
   ======================================================================== */

.match-meta{
  min-width:0;
  max-width:100%;
  margin-top:12px;
  margin-bottom:12px;
  text-align:center;
  text-transform:uppercase;
  font-family:var(--h5-font-family);
  font-size:12px;
  line-height:var(--h5-line-height);
  font-weight:600;
  color:rgba(255,255,255,.80);
}

.match-meta__pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
  max-width:100%;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  color:var(--color-content-heading);
  font-family:var(--h5-font-family, var(--h1-font-family));
  font-size:12px;
  line-height:var(--h5-line-height, 1.2);
  font-weight:500;
}

.match-meta__pill strong{
  font-weight:600;
  font-size:12px;
  color:var(--color-content-heading);
}

/* ========================================================================
   4. TABS
   ======================================================================== */

.match-tabs{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:5px;
  min-width:0;
  max-width:100%;
}

.match-tabs > a{
  margin:0 !important;
  max-width:100%;
}

/* ========================================================================
   16. BREADCRUMBS
   ======================================================================== */

.afw-breadcrumbs{
  margin:0 0 14px;
}

.afw-breadcrumbs__list{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}

.afw-breadcrumbs__item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}

.afw-breadcrumbs__item:not(:last-child)::after{
  content:"/";
  color:rgba(255,255,255,.34);
  font-size:12px;
  line-height:1;
  font-weight:600;
}

.afw-breadcrumbs__link,
.afw-breadcrumbs__current{
  font-size:13px;
  line-height:1.35;
  font-weight:600;
  text-decoration:none;
}

.afw-breadcrumbs__link{
  color:rgba(255,255,255,.62);
}

.afw-breadcrumbs__link:hover{
  color:var(--color-content-heading);
}

.afw-breadcrumbs__current{
  color:var(--color-content-heading);
}

/* ========================================================================
   18. Note
   ======================================================================== */

.match-note{
  display:block;
  width:100%;
  margin:12px 0;
  padding:12px 14px;
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.92);
  text-align:center;
  font-size:14px;
  line-height:1.5;
  font-weight:600;
}

.match-lazy-panel{
  min-height:72px;
}

@media (max-width:640px){
  .match-note{
    padding:10px 12px;
    font-size:13px;
    line-height:1.45;
  }
}
