/* Compact, baseball-card-inspired hockey stats on phones. */
.player-compact-wrap { display: none; }
@media (max-width: 767px) {
  .player-stats-tabs .nav-tabs {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .player-stats-tabs .nav-tabs > li {
    float: none; flex: 0 0 auto; white-space: nowrap;
  }
  .player-stats-tabs .nav-tabs > li > a { padding: 10px 12px; }
  .player-stats-tabs .tab-content { padding-left: 0; padding-right: 0; }
  .player-stats-tabs table.stats.player-original-stats { display: none !important; }
  .player-stats-tabs .player-compact-wrap { display: block; width: 100%; margin: 10px 0 22px; }
  .player-stats-tabs .player-compact-table {
    width: 100%; border-collapse: collapse; table-layout: fixed;
    font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums;
    color: #222; background: #fff;
  }
  .player-stats-tabs .player-compact-table th {
    background: #26364a; color: #fff; font-size: 10px;
    text-transform: uppercase; letter-spacing: .2px; padding: 8px 3px;
    text-align: center; border: 0;
  }
  .player-stats-tabs .player-compact-table td {
    padding: 8px 3px; border-bottom: 1px solid #ddd; text-align: center;
    vertical-align: middle;
  }
  .player-stats-tabs .player-compact-table tbody tr:nth-child(4n+3) { background: #f4f5f7; }
  .player-stats-tabs .player-compact-table th:nth-child(1),
  .player-stats-tabs .player-compact-table td:nth-child(1) { width: 14%; }
  .player-stats-tabs .player-compact-table th:nth-child(2),
  .player-stats-tabs .player-compact-table td:nth-child(2) {
    width: 34%; text-align: left;
  }
  .player-stats-tabs .player-compact-table th:nth-child(3),
  .player-stats-tabs .player-compact-table th:nth-child(4),
  .player-stats-tabs .player-compact-table th:nth-child(5),
  .player-stats-tabs .player-compact-table td:nth-child(3),
  .player-stats-tabs .player-compact-table td:nth-child(4),
  .player-stats-tabs .player-compact-table td:nth-child(5) { width: 9%; }
  .player-stats-tabs .player-compact-table th:nth-child(6),
  .player-stats-tabs .player-compact-table td:nth-child(6) { width: 25%; }
  .player-stats-tabs .player-compact-toggle {
    display: inline; padding: 0; border: 0; background: transparent;
    color: #26364a; font: inherit; font-weight: 600; text-align: left;
    text-decoration: underline; text-decoration-style: dotted;
    text-underline-offset: 2px; overflow-wrap: anywhere; cursor: pointer;
  }
  .player-stats-tabs .player-compact-toggle:focus-visible { outline: 2px solid #cc0037; }
  .player-stats-tabs .player-compact-table .player-compact-total {
    background: #e6e9ed !important; font-weight: 700;
    border-top: 2px solid #26364a;
  }
  .player-stats-tabs .player-compact-table .player-compact-detail {
    background: #eef1f5 !important; color: #404b59; font-size: 11px;
  }
  .player-stats-tabs .player-compact-table .player-compact-detail[hidden] { display: none !important; }
  .player-stats-tabs .player-compact-table .player-compact-detail td {
    padding: 9px 10px; text-align: left; width: auto;
  }
}

/* Seven-column game logs: keep PIM and Result visible together. */
@media (max-width: 767px) {
  .player-stats-tabs .player-compact-game th:nth-child(1),
  .player-stats-tabs .player-compact-game td:nth-child(1) { width: 13%; }
  .player-stats-tabs .player-compact-game th:nth-child(2),
  .player-stats-tabs .player-compact-game td:nth-child(2) { width: 30%; }
  .player-stats-tabs .player-compact-game th:nth-child(3),
  .player-stats-tabs .player-compact-game td:nth-child(3),
  .player-stats-tabs .player-compact-game th:nth-child(4),
  .player-stats-tabs .player-compact-game td:nth-child(4),
  .player-stats-tabs .player-compact-game th:nth-child(5),
  .player-stats-tabs .player-compact-game td:nth-child(5) { width: 8%; }
  .player-stats-tabs .player-compact-game th:nth-child(6),
  .player-stats-tabs .player-compact-game td:nth-child(6) { width: 9%; }
  .player-stats-tabs .player-compact-game th:nth-child(7),
  .player-stats-tabs .player-compact-game td:nth-child(7) { width: 24%; }
}

/* V4: compact section headers, and PIM on career totals. */
.player-compact-section-heading { display: none; }
@media (max-width: 767px) {
  .player-stats-tabs .player-compact-original-heading { display: none !important; }
  .player-stats-tabs .player-compact-section-heading {
    display: flex; align-items: center; gap: 12px;
    min-height: 65px; margin: 12px 0 6px;
    padding: 8px 10px; background: #f4f5f7;
    border-left: 3px solid #cc0037;
    clear: both;
  }
  .player-stats-tabs .player-compact-section-logo {
    display: block; flex: 0 0 50px; width: 50px; height: 50px;
    object-fit: contain; padding: 0; margin: 0; float: none;
  }
  .player-stats-tabs .player-compact-section-title {
    flex: 1; min-width: 0; font-size: 13px; line-height: 1.35;
    font-weight: 700; color: #26364a;
  }
  .player-stats-tabs .player-compact-section-heading + table.stats + .player-compact-wrap {
    margin-top: 0;
  }
  .player-stats-tabs .player-compact-career th:nth-child(1),
  .player-stats-tabs .player-compact-career td:nth-child(1) { width: 19%; }
  .player-stats-tabs .player-compact-career th:nth-child(2),
  .player-stats-tabs .player-compact-career td:nth-child(2) { width: 33%; }
  .player-stats-tabs .player-compact-career th:nth-child(n+3),
  .player-stats-tabs .player-compact-career td:nth-child(n+3) { width: 9.6%; }
  .player-stats-tabs .player-compact-career { font-size: 10px; }
  .player-stats-tabs .player-compact-career th { font-size: 9px; }
}

/* V5: desktop mirrors the mobile baseball-card aesthetic, showing all source columns. */
@media (min-width: 768px) {
  .player-stats-tabs .player-compact-original-heading { display: none !important; }
  .player-stats-tabs .player-compact-section-heading {
    display: flex; align-items: center; gap: 16px;
    min-height: 78px; padding: 12px 16px; margin: 12px 0 10px;
    background: #f4f5f7; border-left: 4px solid #cc0037;
    clear: both;
  }
  .player-stats-tabs .player-compact-section-logo {
    display: block; width: 60px; height: 60px; flex: 0 0 60px;
    object-fit: contain; margin: 0; padding: 0; float: none;
  }
  .player-stats-tabs .player-compact-section-title {
    flex: 1; min-width: 0; font-size: 16px; line-height: 1.35;
    font-weight: 700; color: #26364a;
  }
  .player-stats-tabs .player-desktop-stats-scroll {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats {
    width: 100% !important; min-width: 650px; table-layout: auto;
    border-collapse: collapse; background: #fff; color: #222;
    font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums;
    margin: 0;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr:first-child > th {
    background: #26364a !important; color: #fff !important;
    font-size: 11px; text-transform: uppercase; letter-spacing: .2px;
    padding: 9px 7px; border: 0; white-space: nowrap;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr:not(:first-child) > td,
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr:not(:first-child) > th {
    padding: 8px 7px; border: 0; border-bottom: 1px solid #ddd;
    background: transparent; color: #222;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr:nth-child(odd):not(:first-child) {
    background: #f4f5f7;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr.player-desktop-total {
    background: #e6e9ed !important; border-top: 2px solid #26364a;
    font-weight: 700;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr.player-desktop-total > td,
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr.player-desktop-total > th {
    background: transparent !important; font-weight: 700;
  }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr > :first-child { white-space: nowrap; }
  .player-stats-tabs .player-desktop-stats-scroll > table.stats tr > :nth-child(2) { text-align: left; }
}

/* V7: Make the horizontal season navigation discoverable on mobile. */
.player-season-tabs-holder { position: relative; }
.player-season-scroll-hint { display: none; }
@media (max-width: 767px) {
  .player-stats-tabs .player-season-tabs-holder {
    position: relative; padding-bottom: 24px; margin-bottom: 6px;
  }
  .player-stats-tabs .player-season-tabs-holder .nav-tabs {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scroll-behavior: smooth; padding-right: 30px;
    border-bottom: 2px solid #26364a;
  }
  .player-stats-tabs .player-season-tabs-holder.player-season-can-scroll::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 24px;
    width: 40px; pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff 85%);
  }
  .player-stats-tabs .player-season-scroll-hint:not([hidden]) {
    display: block; position: absolute; right: 4px; bottom: 2px;
    color: #26364a; font-size: 11px; font-weight: 700;
    letter-spacing: .1px;
  }
}
