/* CastoloFC — match page styles (platform-new) */

/* Hereda variables y body de platform-new.css */

/* ── MATCH HERO ── */
body.platform-new .match-hero {
  background: var(--white);
  border: 1px solid #e0d8ce;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
body.platform-new .mh-comp-bar {
  background: var(--main-color);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--third-color);
  position: relative;
}
body.platform-new .mh-comp-bar img { object-fit: contain; }
body.platform-new .mh-datetime {
  font-size: 11px; color: var(--third-color); opacity: .65;
  position: absolute; left: 16px;
  font-weight: 400; letter-spacing: 0; text-transform: none;
}
body.platform-new .mh-score-area {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 20px 24px 16px;
}
body.platform-new .mh-team {
  display: flex; align-items: center; gap: 12px; flex: 1;
}
body.platform-new .mh-team.home { justify-content: flex-end; }
body.platform-new .mh-team.away { justify-content: flex-start; }
body.platform-new .mh-team-name {
  font-size: 18px; font-weight: 700; color: var(--main-color); white-space: nowrap;
}
body.platform-new .mh-team-name.dimmed { color: #968a7d; }
body.platform-new .mh-team a { color: inherit; text-decoration: none; }
body.platform-new .mh-team a:hover .mh-team-name { color: var(--secondary-color); }
body.platform-new .mh-center {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0; padding: 0 16px;
}
body.platform-new .mh-scoreboard { display: flex; gap: 2px; align-items: center; }
body.platform-new .mh-score-box {
  width: 52px; height: 58px;
  border: 1px solid #d0ccc8;
  background: var(--white);
  font-family: "Lora", serif; font-size: 38px; font-weight: 600;
  color: var(--main-color);
  display: flex; align-items: center; justify-content: center;
}
body.platform-new .mh-score-box.winner {
  background: var(--third-color);
  border-color: var(--secondary-color);
}
body.platform-new .mh-status {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 8px; margin-top: 2px;
}
body.platform-new .status-ft {
  background: var(--fourth-color); color: var(--secondary-color);
  border: 1px solid #e0d8ce;
}
body.platform-new .status-live {
  background: #e74c3c; color: white; animation: pn-pulse 1.5s infinite;
}
body.platform-new .status-pre {
  background: var(--fourth-color); color: var(--secondary-color);
  border: 1px solid #e0d8ce;
}
@keyframes pn-pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
body.platform-new .mh-minute {
  font-size: 12px; color: var(--secondary-color); font-weight: 600;
}
body.platform-new .mh-goals {
  font-size: 10px; color: var(--secondary-color);
  line-height: 1.5; margin-top: 2px;
}
body.platform-new .mh-info-strip {
  display: flex; justify-content: center; gap: 24px;
  padding: 8px 20px 12px;
  border-top: 1px solid #f0ebe3;
  flex-wrap: wrap;
}
body.platform-new .mh-info-item { display: flex; align-items: center; gap: 5px; }
body.platform-new .mh-info-key {
  font-size: 10px; color: var(--secondary-color); opacity: .7;
  text-transform: uppercase; letter-spacing: .5px;
}
body.platform-new .mh-info-val { font-size: 11px; color: var(--main-color); font-weight: 600; }

/* ── TIMELINE ── */
body.platform-new .timeline { position: relative; padding: 8px 0; }
body.platform-new .timeline-axis {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: #e0d8ce; transform: translateX(-50%);
}
body.platform-new .timeline-halftime {
  position: relative; z-index: 1; display: flex; justify-content: center; margin: 8px 0;
}
body.platform-new .timeline-halftime-pill {
  background: var(--fourth-color); border: 1px solid var(--third-color);
  border-radius: 10px; font-size: 10px; font-weight: 600;
  color: var(--secondary-color); padding: 2px 12px; letter-spacing: .5px;
}
body.platform-new .tl-event {
  position: relative; z-index: 1;
  display: flex; align-items: center; margin: 6px 0;
}
body.platform-new .tl-event.home { flex-direction: row-reverse; padding-right: calc(50% + 16px); }
body.platform-new .tl-event.away { flex-direction: row; padding-left: calc(50% + 16px); }
body.platform-new .tl-minute {
  width: 36px; font-size: 11px; font-weight: 700;
  color: var(--secondary-color); text-align: center; flex-shrink: 0;
}
body.platform-new .tl-event.home .tl-minute { text-align: left; }
body.platform-new .tl-dot-wrap {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 32px; flex-shrink: 0; display: flex; justify-content: center;
}
body.platform-new .tl-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 7px;
}
body.platform-new .tl-dot-goal { background: var(--main-color); border-color: var(--third-color); }
body.platform-new .tl-dot-yellow { background: #f1c40f; border-color: #e67e22; }
body.platform-new .tl-dot-red { background: #e74c3c; border-color: #c0392b; }
body.platform-new .tl-dot-sub { background: #3498db; border-color: #2980b9; }
body.platform-new .tl-card {
  background: var(--white); border: 1px solid #e8e0d4; border-radius: 6px;
  padding: 5px 10px; display: flex; align-items: center; gap: 8px; max-width: 260px;
}
body.platform-new .tl-event.home .tl-card { border-left: 3px solid var(--main-color); }
body.platform-new .tl-event.away .tl-card { border-right: 3px solid var(--secondary-color); }
body.platform-new .tl-icon { font-size: 14px; flex-shrink: 0; }
body.platform-new .tl-player { font-size: 12px; font-weight: 600; color: #1a1512; }
body.platform-new .tl-detail { font-size: 10px; color: var(--secondary-color); }

/* ── STATS BARS ── */
body.platform-new .stat-bar-row {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 8px; margin-bottom: 10px;
}
body.platform-new .stat-bar-val { font-size: 13px; font-weight: 700; color: var(--main-color); }
body.platform-new .stat-bar-val.home { text-align: right; }
body.platform-new .stat-bar-val.away { text-align: left; }
body.platform-new .stat-bar-label {
  font-size: 10px; font-weight: 600; color: var(--secondary-color);
  text-align: center; text-transform: uppercase; letter-spacing: .4px;
  width: 110px; flex-shrink: 0;
}
body.platform-new .stat-bar-track {
  height: 6px; border-radius: 3px; background: #e8e0d4; overflow: hidden;
  position: relative; width: 80px;
}
body.platform-new .stat-bar-fill { height: 6px; border-radius: 3px; }
body.platform-new .stat-bar-fill.home { background: linear-gradient(90deg, var(--third-color), #826E5E); float: right; }
body.platform-new .stat-bar-fill.away { background: linear-gradient(90deg, #826E5E, var(--third-color)); }
body.platform-new .stat-bar-side { display: flex; align-items: center; gap: 6px; }
body.platform-new .stat-bar-side.home { justify-content: flex-end; }
body.platform-new .stat-bars-header {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #e8e0d4;
}
body.platform-new .stat-team-name {
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
body.platform-new .stat-team-name.home { justify-content: flex-end; }

/* ── PLAYER STATS TABLE ── */
body.platform-new .player-stats-table { width: 100%; border-collapse: collapse; font-size: 12px; }
body.platform-new .player-stats-table thead th {
  background: var(--main-color); color: var(--third-color); font-weight: 600;
  padding: 7px 8px; text-align: center; white-space: nowrap; font-size: 11px;
}
body.platform-new .player-stats-table thead th:nth-child(2) { text-align: left; }
body.platform-new .player-stats-table tbody tr { border-bottom: 1px solid #e8e0d4; transition: background .15s; }
body.platform-new .player-stats-table tbody tr:hover { background: var(--fourth-color); }
body.platform-new .player-stats-table tbody td { padding: 6px 8px; text-align: center; vertical-align: middle; }
body.platform-new .player-stats-table tbody td:nth-child(2) { text-align: left; }
body.platform-new .player-stats-table tbody tr.top-performer { background: var(--fourth-color); }
body.platform-new .player-stats-table tbody tr.top-performer td { font-weight: 600; }
body.platform-new .pst-player { display: flex; align-items: center; gap: 6px; }
body.platform-new .pst-num {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--main-color); color: var(--third-color);
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
body.platform-new .pst-rating {
  font-weight: 700; padding: 2px 5px; border-radius: 3px; font-size: 11px;
}
body.platform-new .rating-high { background: #d1e7dd; color: #0a3622; }
body.platform-new .rating-mid  { background: #fff3cd; color: #856404; }
body.platform-new .rating-low  { background: #f8d7da; color: #842029; }

/* ── HEAD TO HEAD ── */
body.platform-new .h2h-summary {
  display: flex; gap: 20px; margin-bottom: 14px; flex-wrap: wrap;
}
body.platform-new .h2h-summary > div {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; min-width: 60px;
}
body.platform-new .h2h-summary .h2h-num {
  font-family: 'Lora', serif; font-size: 28px;
}
body.platform-new .h2h-summary .h2h-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
}
body.platform-new .h2h-row { display: flex; flex-direction: column; gap: 6px; }
body.platform-new .h2h-game {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--white); border: 1px solid #e8e0d4;
  border-radius: 6px; font-size: 12px;
}
body.platform-new .h2h-game.is-current { border-left: 3px solid var(--third-color); }
body.platform-new .h2h-date { width: 60px; color: var(--secondary-color); font-size: 10px; flex-shrink: 0; }
body.platform-new .h2h-teams { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
body.platform-new .h2h-team { width: 130px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
body.platform-new .h2h-team.local { text-align: right; justify-content: flex-end; }
body.platform-new .h2h-score { display: flex; gap: 1px; }
body.platform-new .h2h-box {
  width: 22px; height: 22px; border: 1px solid #ccc;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; border-radius: 2px;
}
body.platform-new .h2h-box.w {
  background: var(--third-color); border-color: var(--secondary-color);
  color: var(--main-color);
}
body.platform-new .h2h-comp { font-size: 10px; color: var(--secondary-color); width: 60px; text-align: right; }

/* ── FORMATIONS PITCH ── */
body.platform-new .pn-pitch-svg { width: 100%; display: block; }

@media (max-width: 700px) {
  body.platform-new .mh-score-area { padding: 14px 8px 10px; gap: 0; }
  body.platform-new .mh-team-name { font-size: 14px; }
  body.platform-new .mh-team.home, body.platform-new .mh-team.away { gap: 6px; }
  body.platform-new .mh-goals { font-size: 9px; }
  body.platform-new .mh-score-box { width: 40px; height: 48px; font-size: 30px; }
  body.platform-new .mh-center { padding: 0 8px; }
  body.platform-new .mh-datetime { font-size: 9px; }
  body.platform-new .mh-info-strip { gap: 14px; }
  body.platform-new .tl-event.home { padding-right: calc(50% + 10px); }
  body.platform-new .tl-event.away { padding-left: calc(50% + 10px); }
  body.platform-new .tl-card { max-width: 180px; }
}
