/* Chart Page Specific Styles - Light Golden Theme */

.chart-header {
  background: var(--white);
  padding: 2rem 0;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-title {
  font-size: 2rem;
  color: var(--black);
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.chart-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  background: #fdfdfd;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid #eaeaea;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.chart-select {
  padding: 0.8rem 1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  min-width: 150px;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
  appearance: auto;
}

.chart-select:focus, .chart-select:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 224, 0, 0.2);
}

.btn-load {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: var(--font-display);
}

.btn-load:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: #666;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.btn-back:hover {
  color: var(--black);
}

.chart-container-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #eaeaea;
  overflow: auto; /* Enable both vertical and horizontal scrolling */
  width: 100%;
  max-width: 100vw;
  max-height: 75vh; /* Required for sticky top headers to work! */
  margin-bottom: 4rem;
  -webkit-overflow-scrolling: touch;
}

#chartContainer {
  width: 100%;
}

.chart-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px; /* Force horizontal scroll on mobile */
  background: var(--white);
}

.chart-table th {
  background: linear-gradient(135deg, #D4A017, #B8860B);
  color: #fff;
  padding: 1rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.chart-table th.col-date {
  left: 0;
  z-index: 20;
}

.chart-table td {
  padding: 0.8rem;
  text-align: center;
  border: 1px solid #eaeaea;
  font-weight: 600;
  color: var(--black);
}

.chart-table td.col-date {
  font-weight: 700;
  color: var(--black);
  background: #fdfdfd;
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 2px solid var(--gold);
}

.chart-table tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

.chart-table tbody tr:hover {
  background-color: #FFFDE7;
}

.row-today td {
  background-color: rgba(255, 224, 0, 0.15) !important;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  font-weight: 700;
}

.cell-empty {
  color: #999 !important;
  font-weight: 400 !important;
}

.loading, .error {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #666;
  font-weight: 600;
}

.error {
  color: #dc2626;
}
