/* =========================================================
   Mobile pass — 2020-schedule.html only
   Fix playoff match tables inside player cards
   ========================================================= */

/* Desktop / tablet: horizontal scroll fallback if still wide */
body.mobile-pass-2020 .mp-po-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

body.mobile-pass-2020 .mp-po-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 !important;
}

/* Phone: stack each playoff game as a card */
@media (max-width: 767px) {
  body.mobile-pass-2020 .app-main {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  body.mobile-pass-2020 .mp-po-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
  }

  body.mobile-pass-2020 .mp-po-wrap table,
  body.mobile-pass-2020 .mp-po-wrap thead,
  body.mobile-pass-2020 .mp-po-wrap tbody,
  body.mobile-pass-2020 .mp-po-wrap th,
  body.mobile-pass-2020 .mp-po-wrap td,
  body.mobile-pass-2020 .mp-po-wrap tr {
    display: block;
    width: 100%;
  }

  body.mobile-pass-2020 .mp-po-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.mobile-pass-2020 .mp-po-wrap tbody tr {
    background: var(--main-surface-2, #f8fafc);
    border: 1px solid var(--main-border, #e5e7eb);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    margin: 0 0 0.65rem 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }

  body.mobile-pass-2020 .mp-po-wrap tbody tr:last-child {
    margin-bottom: 0.25rem;
  }

  body.mobile-pass-2020 .mp-po-wrap td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.28rem 0 !important;
    border: none !important;
    font-size: 0.86rem;
    line-height: 1.35;
    white-space: normal !important;
    text-align: right;
    color: var(--main-text, #1f2937);
  }

  body.mobile-pass-2020 .mp-po-wrap td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 45%;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--main-text-muted, #6b7280);
  }

  /* Emphasize result + score rows */
  body.mobile-pass-2020 .mp-po-wrap td[data-label="Result"],
  body.mobile-pass-2020 .mp-po-wrap td[data-label="Score"] {
    font-weight: 700;
  }

  body.mobile-pass-2020 .mp-po-wrap .text-green-600 {
    color: #16a34a !important;
  }
  body.mobile-pass-2020 .mp-po-wrap .text-red-600 {
    color: #dc2626 !important;
  }

  html[data-theme="dark"] body.mobile-pass-2020 .mp-po-wrap tbody tr {
    background: var(--main-surface-2, #222);
    border-color: var(--main-border, #2e2e2e);
  }

  /* DNQ / plain text playoff notes */
  body.mobile-pass-2020 .team-card [id$="-tab-1"] > .stat-block > p,
  body.mobile-pass-2020 .team-card [id$="-tab-1"] .stat-block > p {
    font-size: 0.88rem;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
    background: var(--main-surface-2, #f8fafc);
    border: 1px solid var(--main-border, #e5e7eb);
    border-radius: 10px;
  }
}
