/**
 * Match Scoreboard Inline Styles
 * Adapted for embedded display within yatzy.html game view
 * Compact, responsive variant of match-scoreboard.css
 */

/* Container for embedded scoreboard - minimal styling, no frame */
.match-scoreboard-inline {
  margin-bottom: 1.5rem;
}

/* Compact header */
.match-scoreboard-inline .scoreboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0e0e0;
}

.match-scoreboard-inline .scoreboard-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.match-scoreboard-inline .match-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-scoreboard-inline .match-status-badge.in_progress {
  background: #e3f2fd;
  color: #1976d2;
}

.match-scoreboard-inline .match-status-badge.completed {
  background: #e8f5e9;
  color: #388e3c;
}

.match-scoreboard-inline .match-status-badge.waiting {
  background: #fff3e0;
  color: #f57c00;
}

/* Score sheet container */
.match-scoreboard-inline .scorecard-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Score sheet grid */
.match-scoreboard-inline .scorecard {
  min-width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: white;
}

.match-scoreboard-inline .sc-row {
  display: contents;
}

.match-scoreboard-inline .sc-cell {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
  text-align: center;
  font-size: 0.875rem;
}

.match-scoreboard-inline .sc-label {
  text-align: left;
  font-weight: 500;
  background: #fafafa;
  position: sticky;
  left: 0;
  z-index: 1;
}

.match-scoreboard-inline .sc-value {
  font-variant-numeric: tabular-nums;
}

/* Header row */
.match-scoreboard-inline .sc-head {
  font-weight: 600;
}

.match-scoreboard-inline .sc-header {
  background: #667eea;
  color: white;
  padding: 0.75rem;
  border-bottom: 2px solid #5568d3;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Special rows */
.match-scoreboard-inline .sc-subtotal {
  background: #f5f5f5;
  font-weight: 600;
}

.match-scoreboard-inline .sc-bonus {
  background: #fff9e6;
  font-style: italic;
}

.match-scoreboard-inline .sc-total {
  background: #667eea;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-top: 3px solid #5568d3;
}

/* Remove last cell borders */
.match-scoreboard-inline .sc-row:last-child .sc-cell {
  border-bottom: none;
}

/* Mobile responsive */
@media (max-width: 576px) {
  .match-scoreboard-inline {
    padding: 0.75rem;
  }

  .match-scoreboard-inline .scoreboard-title {
    font-size: 1.1rem;
  }

  .match-scoreboard-inline .sc-cell {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .match-scoreboard-inline .sc-label {
    font-size: 0.75rem;
  }

  .match-scoreboard-inline .sc-header {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .match-scoreboard-inline .sc-total {
    font-size: 0.9rem;
  }
}

/* Tablet adjustments */
@media (min-width: 577px) and (max-width: 992px) {
  .match-scoreboard-inline .sc-cell {
    font-size: 0.85rem;
  }
}

/* Hide scrollbar but keep functionality */
.match-scoreboard-inline .scorecard-container::-webkit-scrollbar {
  height: 6px;
}

.match-scoreboard-inline .scorecard-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.match-scoreboard-inline .scorecard-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.match-scoreboard-inline .scorecard-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}
