/* Container */
.heatmap-container {
  background: #fff;
  color: #6c757d;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-x: auto;
}

.heatmap-caption {
  font-size: 12px;
  color: #9ca3af;
  width: 100%;
  text-align: center;
  margin: 0.25rem 0 0.5rem;
}

/* Grid rows */
.row-grid { display: grid; min-width: min-content; column-gap: var(--cell-gap, 30px); 
 grid-template-columns:
    minmax(var(--axis-width, 50px), var(--axis-width, 50px))
    repeat(var(--cols, 24), minmax(var(--cell-min, 30px), 1fr));
}


/* Labels */
.axis-spacer { min-width: 8px; }
.grid-cell-label {
  text-align: center;
  font-size: 0.8rem;
  padding: 0.25rem;
  color: inherit;
}
.y-label-cell {
  font-size: 0.9rem;
  text-align: right;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  color: inherit;
}

/* Cells (use variables for size, gap, border, radius) */
.grid-cell {
  width: 100%;
  height: var(--cell-size, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cell-border, #f3f4f6);
  border-radius: var(--cell-radius, 4px);
  min-width: var(--cell-size, 24px);
  min-height: var(--cell-size, 24px);
  margin: var(--cell-gap, 2px);
}

/* Colors via variables */
.cell-empty  { background-color: var(--color-empty); }
.cell-low    { background-color: var(--color-low); }
.cell-medium { background-color: var(--color-medium); }
.cell-high   { background-color: var(--color-high); }

/* Skeleton */
.heatmap-skeleton { opacity: 0.9; }
.skeleton-grid { display: flex; }
.x-labels-skeleton { display: grid; margin-bottom: 0.5rem; }
.y-labels-skeleton { display: flex; flex-direction: column; justify-content: space-around; margin-right: 1rem; max-width: 40px; width: fit-content; overflow: auto; }
.cells-skeleton { display: flex; flex-direction: column; width: 100%; }
.skeleton { border-radius: 4px; background: rgba(0,0,0,0.06); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); animation: shimmer 1.2s infinite; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%); }
.skeleton--sm    { height: 1rem; width: 2rem; margin: 0.125rem auto; }
.skeleton--label { height: 1rem; width: 3rem; margin: 0.25rem 0; }
.skeleton--cell  { height: 1.5rem; width: 1.5rem; margin: 2px; border-radius: 4px; }
.x-labels-skeleton,
.skeleton-row {
  display: grid;
  grid-template-columns:
    minmax(var(--axis-width, 50px), var(--axis-width, 50px))
    repeat(var(--cols, 24), minmax(var(--cell-min, 30px), 1fr));
  column-gap: var(--cell-gap, 2px);
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
