body {
  font-family: Arial, sans-serif;
  margin: 20px;
}

/* Container for the grid (if needed) */
#contrastGrid {
  overflow: auto;
  max-height: 80vh;
}

/* Grid cells: 60px square */
th, td {
  border: 1px solid #ccc;
  width: 60px;
  height: 60px;
  text-align: center;
  vertical-align: middle;
}

/* Header styling */
th {
  font-weight: normal;
  font-size: 0.7rem;
  padding: 5px;
}

/* Bold contrast cell text */
.contrast-cell {
  font-weight: bold;
  position: relative;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

/* Sticky header: thead cells */
thead th.x-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 3;
}
thead th.x-header:first-child {
  left: 0;
  z-index: 4;
}

/* Sticky first column in tbody */
tbody th.y-header {
  position: sticky;
  left: 0;
  background: white;
  z-index: 2;
}

/* Header drop shadows using custom property */
thead th.x-header {
  box-shadow: inset 0 -5px 0 0 var(--th-color);
}
tbody th.y-header {
  box-shadow: inset -5px 0 0 0 var(--th-color);
}

/* Color list styling */
.color-list {
  margin-bottom: 20px;
}
.color-item {
  margin-bottom: 5px;
}
.edit-btn,
.update-btn,
.add-now-btn {
  cursor: pointer;
  margin-left: 10px;
}

/* Filter options */
#filterOptions {
  margin-bottom: 20px;
}
#filterOptions label {
  margin-right: 10px;
}

/* Overlay styling for copy functionality */
.contrast-cell .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.95);
  color: black;
  display: flex;
  flex-direction: column; /* Stack vertically */
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
}
.contrast-cell:hover .overlay {
  opacity: 1;
}
.contrast-cell .overlay.persistent {
  opacity: 1 !important;
}
.overlay .overlay-part {
  width: 100%;
  height: 50%; /* Each half takes 50% vertically */
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.square {
  margin-right: 3px;
  font-size: 150%;
}
.overlay-part:hover {
  background-color: rgba(220,220,220,0.8);
}

/* Filtering using classes */
.contrast-cell.dimmed {
  opacity: 0.2 !important;
}
.contrast-cell.focused {
  opacity: 1 !important;
}

/* Additional styles for shades container */
.shades-container {
  display: inline-block;
  vertical-align: middle;
}
.shade-input {
  display: inline-block;
  width: auto;
  vertical-align: middle;
  margin-right: 5px;
}

/* Footnote */
.footnote {
  margin-top: 10px;
  font-size: 0.7rem;
}
