/* Team score cards from the approved ALPHA design.
   The original Vue score rows remain in the DOM as the live data source, but
   are visually replaced by the synchronized .mock-score overlay. */

/* Tablet and phone score cards use the same single source of truth as desktop.
   Keep the legacy Vue rows available to the app, but never show their duplicate
   Team / Score / Tricks labels in the interface. */
@media (max-width: 1199px) {
  .team-1-bg,
  .team-2-bg {
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  .team-1-bg > .row,
  .team-2-bg > .row {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .team-1-bg::before,
  .team-1-bg::after,
  .team-2-bg::before,
  .team-2-bg::after {
    content: none !important;
    display: none !important;
  }

  .team-1-bg .mock-score,
  .team-2-bg .mock-score {
    visibility: visible !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;
    display: grid !important;
    grid-template-rows: 30px 1fr !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 10px 12px 12px !important;
    pointer-events: none !important;
  }

  .mock-score__team {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    color: #f6f8fa !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
  }

  .mock-score__stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  .mock-score__stat {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-width: 0 !important;
    color: rgba(238, 244, 249, .78) !important;
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    letter-spacing: .02em !important;
    text-align: left !important;
  }

  .mock-score__stat + .mock-score__stat {
    padding-left: 12px !important;
    border-left: 1px solid rgba(255, 255, 255, .16) !important;
  }

  .mock-score__value {
    display: block !important;
    margin: 0 0 5px !important;
    color: #fff !important;
    font-size: 26px !important;
    line-height: .9 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
  }
}

/* On phones each stat owns exactly half of its team card. Keep the team name
   left-aligned, but center the Score/Tricks value and label inside each half so
   the two columns read as balanced units. */
@media (max-width: 767px) {
  body #pepper-app .mock-score__stat {
    align-items: center !important;
    text-align: center !important;
  }

  body #pepper-app .mock-score__stat + .mock-score__stat {
    padding-left: 0 !important;
  }
}

@media (max-width: 479px) {
  .team-1-bg .mock-score,
  .team-2-bg .mock-score {
    grid-template-rows: 26px 1fr !important;
    padding: 8px 10px 10px !important;
  }

  .mock-score__team {
    font-size: 11px !important;
  }

  .mock-score__stat {
    font-size: 9px !important;
  }

  .mock-score__value {
    margin-bottom: 4px !important;
    font-size: 22px !important;
  }
}

@media (min-width: 1200px) {
  .team-1-bg,
  .team-2-bg {
    position: relative !important;
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
  }

  /* Do not render the old stacked Score/Tricks + Team rows. The score helper
     still reads these nodes and mirrors their live values into .mock-score. */
  .team-1-bg > .row,
  .team-2-bg > .row {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .team-1-bg::before,
  .team-1-bg::after,
  .team-2-bg::before,
  .team-2-bg::after {
    content: none !important;
    display: none !important;
  }

  .team-1-bg .mock-score,
  .team-2-bg .mock-score {
    visibility: visible !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;
    display: grid !important;
    grid-template-rows: 42px 1fr !important;
    width: 100% !important;
    height: 100% !important;
    padding: 10px 28px 14px !important;
    margin: 0 !important;
    pointer-events: none !important;
  }

  .mock-score__team {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #f6f8fa !important;
    font-size: 19px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
  }

  .mock-score__stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  .mock-score__stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    height: 68px !important;
    color: #bdc9d4 !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
    font-weight: 400 !important;
    text-align: center !important;
  }

  .mock-score__stat + .mock-score__stat {
    border-left: 1px solid rgba(255, 255, 255, .18) !important;
  }

  .mock-score__value {
    display: block !important;
    margin-top: 7px !important;
    color: #fff !important;
    font-size: 38px !important;
    line-height: .9 !important;
    font-weight: 700 !important;
  }
}
