/* public/css/scorecard.css */

.sc-modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.sc-modal.open { display: block; }

.sc-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }

.sc-panel {
  position: absolute;
  left: 50%;
  top: 6%;
  transform: translateX(-50%);
  width: min(1200px, 96vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e6e6e6;
}

.sc-title { font-weight: 700; font-size: 16px; }
.sc-close { border: 0; background: transparent; font-size: 18px; cursor: pointer; }

.sc-roundbar {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sc-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-tab {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #cfcfcf;
  background: #f7f7f7;
  cursor: pointer;
  font-weight: 600;
}
.sc-tab.active { background: #ececec; border-color: #999; }
.sc-tab.disabled { opacity: .45; cursor: not-allowed; }

.sc-hint { font-size: 12px; color: #666; white-space: nowrap; }

.sc-body { padding: 12px 14px; overflow: auto; }

.sc-tablewrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sc-table {
  border-collapse: collapse;
  width: max(980px, 100%);
  table-layout: fixed;
}

.sc-table th, .sc-table td {
  border: 1px solid #e2e2e2;
  padding: 8px 6px;
  text-align: center;
  font-size: 13px;
}

.sc-table th:first-child,
.sc-table td:first-child {
  text-align: left;
  font-weight: 700;
  width: 70px;
}

.sc-rowlabel { background: #fafafa; font-weight: 700; }
.sc-total { background: #fafafa; font-weight: 700; }

.sc-cell.sc-empty { color: #bbb; }

/* Score coloring */
/* PGA-style score coloring */
.sc-eagle  { background: #2f855a; color: #fff; }   /* dark green */
.sc-birdie { background: #d8f1e0; }                 /* light green */
.sc-par    { background: #f9f9f9; }                 /* neutral */
.sc-bogey  { background: #ffd7db; }                 /* light red */
.sc-dbl    { background: #e57373; color: #fff; }    /* darker red */

.sc-loading, .sc-message { padding: 16px 0; color: #444; }

.sc-meta { margin-top: 10px; font-size: 12px; color: #666; }

/* Legend */
.sc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  align-items: center;
}

.sc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
}

.sc-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.12);
}
