/* =========================================================
   PGA Scorecard Module
   Display shot-by-shot scorecard data in player card
   ========================================================= */

.pga-scorecard-wrapper {
  width: 100%;
  padding: 0;
  margin: 0;
}

.pga-scorecard-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1de1d1;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(29, 225, 209, 0.2);
  text-align: center;
  letter-spacing: 0.5px;
}

/* Round Switcher */
.pga-scorecard-round-switcher {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pga-round-btn {
  padding: 0.5rem 1rem;
  background: rgba(8, 24, 33, 0.6);
  border: 1px solid rgba(29, 225, 209, 0.25);
  border-radius: 6px;
  color: #9ab4bb;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pga-round-btn:hover {
  background: rgba(29, 225, 209, 0.1);
  border-color: rgba(29, 225, 209, 0.4);
  color: #1de1d1;
  transform: translateY(-1px);
}

.pga-round-btn--active {
  background: rgba(29, 225, 209, 0.15);
  border-color: #1de1d1;
  color: #1de1d1;
  box-shadow: 0 4px 12px rgba(29, 225, 209, 0.2);
}

.pga-round-btn--active:hover {
  transform: none;
}

.pga-scorecard-round {
  margin-bottom: 2rem;
  background: rgba(6, 20, 32, 0.5);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid rgba(29, 225, 209, 0.15);
}

/* Round Stats Grid */
.pga-round-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background: rgba(29, 225, 209, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(29, 225, 209, 0.15);
}

.pga-round-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.375rem;
  background: rgba(8, 24, 33, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(29, 225, 209, 0.1);
  transition: all 0.2s ease;
}

.pga-round-stat-item:hover {
  background: rgba(8, 24, 33, 0.8);
  border-color: rgba(29, 225, 209, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pga-round-stat-label {
  font-size: 0.688rem;
  font-weight: 600;
  color: #9ab4bb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
  text-align: center;
  line-height: 1.1;
}

.pga-round-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #e8f6f8;
  margin-bottom: 0.25rem;
  text-align: center;
  line-height: 1;
}

.pga-round-stat-value.positive {
  color: #00ff88;
}

.pga-round-stat-value.negative {
  color: #ff6b6b;
}

.pga-round-stat-rank {
  font-size: 0.625rem;
  font-weight: 600;
  color: #1de1d1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.4rem;
  background: rgba(29, 225, 209, 0.1);
  border-radius: 4px;
  margin-top: 0.25rem;
}

/* Divider between scoring and SG stats */
.pga-round-stats-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(29, 225, 209, 0.15);
  margin: 0.5rem 0;
}

.pga-scorecard-round-title {
  font-size: 1rem;
  font-weight: 600;
  color: #9ab4bb;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  text-align: center;
}

/* Hide round title when switcher is present (it's redundant) */
.pga-scorecard-round-switcher ~ .pga-scorecard-round .pga-scorecard-round-title {
  display: none;
}

.pga-scorecard-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pga-scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: rgba(8, 24, 33, 0.6);
  border-radius: 6px;
  overflow: hidden;
}

.pga-scorecard-table thead {
  background: rgba(29, 225, 209, 0.08);
}

.pga-scorecard-header th {
  padding: 0.5rem 0.375rem;
  text-align: center;
  font-weight: 600;
  color: #1de1d1;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(29, 225, 209, 0.25);
}

.pga-scorecard-label {
  font-weight: 600;
  color: #9ab4bb;
  text-align: left !important;
  padding-left: 0.75rem !important;
  min-width: 60px;
}

.pga-scorecard-table tbody td {
  padding: 0.5rem 0.375rem;
  text-align: center;
  border-bottom: 1px solid rgba(29, 225, 209, 0.1);
  color: #e8f6f8;
}

.pga-scorecard-par-row td {
  font-weight: 500;
  color: #9ab4bb;
  font-size: 0.813rem;
}

.pga-scorecard-score-row {
  font-weight: 600;
}

/* Score highlighting based on performance */
.pga-scorecard-score {
  position: relative;
  font-weight: 700;
}

.pga-scorecard-score--eagle {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.12);
  border-radius: 4px;
}

.pga-scorecard-score--birdie {
  color: #1de1d1;
  background: rgba(29, 225, 209, 0.12);
  border-radius: 4px;
}

.pga-scorecard-score--par {
  color: #e8f6f8;
}

.pga-scorecard-score--bogey {
  color: #ffb84d;
  background: rgba(255, 184, 77, 0.12);
  border-radius: 4px;
}

.pga-scorecard-score--double-bogey {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
  border-radius: 4px;
}

/* Summary columns */
.pga-scorecard-out,
.pga-scorecard-in,
.pga-scorecard-total {
  font-weight: 700;
  background: rgba(29, 225, 209, 0.08);
  border-left: 2px solid rgba(29, 225, 209, 0.25);
  color: #1de1d1;
}

.pga-scorecard-total {
  background: rgba(29, 225, 209, 0.15);
  border-left: 2px solid rgba(29, 225, 209, 0.4);
  font-size: 0.938rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pga-round-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
  }
  
  .pga-round-stat-item {
    padding: 0.5rem;
  }
  
  .pga-round-stat-label {
    font-size: 0.688rem;
  }
  
  .pga-round-stat-value {
    font-size: 1.25rem;
  }
  
  .pga-round-stat-rank {
    font-size: 0.625rem;
    padding: 0.2rem 0.4rem;
  }
  
  .pga-scorecard-table {
    font-size: 0.75rem;
  }
  
  .pga-scorecard-header th {
    padding: 0.375rem 0.25rem;
    font-size: 0.688rem;
  }
  
  .pga-scorecard-table tbody td {
    padding: 0.375rem 0.25rem;
  }
  
  .pga-scorecard-label {
    min-width: 50px;
    padding-left: 0.5rem !important;
  }
  
  .pga-scorecard-total {
    font-size: 0.813rem;
  }
}

/* Loading state */
.pga-scorecard-wrapper.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Empty state message */
.ssp-player-card-text {
  text-align: center;
  padding: 2rem 1rem;
  color: #9ab4bb;
  font-size: 0.938rem;
}
