/* Resource Heatmap Styles */

.heatmap-container {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

/* Toolbar */
.heatmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* Grid */
.heatmap-grid {
  display: grid;
  grid-auto-rows: auto;
}

/* Sticky user name labels */
.heatmap-label {
  position: sticky;
  left: 0;
  z-index: 2;
  background: white;
  min-width: 150px;
  padding: 6px 8px;
  font-weight: 500;
  font-size: 0.8rem;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}

/* Header date cells */
.heatmap-header-cell {
  text-align: center;
  font-size: 0.7rem;
  padding: 2px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  color: #475569;
  line-height: 1.2;
}

.heatmap-header-cell--weekend {
  background: #f1f5f9;
}

/* Data cells */
.heatmap-cell {
  min-width: 40px;
  height: 32px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: default;
}

/* Over-allocated: red */
.heatmap-cell--over {
  background: #fecaca;
  color: #991b1b;
  font-weight: 600;
  cursor: pointer;
}

/* Near capacity: amber */
.heatmap-cell--near {
  background: #fef3c7;
  color: #92400e;
}

/* Normal load: green */
.heatmap-cell--ok {
  background: #d1fae5;
  color: #065f46;
}

/* Zero capacity: grey */
.heatmap-cell--zero {
  background: #f3f4f6;
  color: #9ca3af;
}

/* Free: no special color */
.heatmap-cell--free {
  background: transparent;
}

/* Weekend overlay */
.heatmap-cell--weekend {
  background: #f8fafc;
}

/* Weekend + color combinations */
.heatmap-cell--over.heatmap-cell--weekend {
  background: #fecaca;
}

.heatmap-cell--near.heatmap-cell--weekend {
  background: #fef3c7;
}

.heatmap-cell--ok.heatmap-cell--weekend {
  background: #d1fae5;
}

.heatmap-cell--zero.heatmap-cell--weekend {
  background: #f1f5f9;
}

/* Popover */
.heatmap-popover {
  position: absolute;
  z-index: 50;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 12px;
  min-width: 200px;
  max-width: 320px;
}

.heatmap-popover-task {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8rem;
}

.heatmap-popover-task:last-child {
  border-bottom: none;
}
