.grid.rdg-wrapper > .rdg {
  --rdg-color: hsl(var(--foreground));
  --rdg-border-color: hsl(var(--border));
  --rdg-summary-border-color: hsl(var(--border));
  --rdg-background-color: hsl(var(--background));
  --rdg-header-background-color: hsl(var(--background));
  --rdg-header-draggable-background-color: hsl(var(--accent));
  --rdg-row-hover-background-color: hsla(var(--accent) / 0.2);
  --rdg-row-selected-background-color: hsla(var(--accent) / 0.4);
  --rdg-row-selected-hover-background-color: hsla(var(--accent) / 0.6);
  --rdg-checkbox-color: hsl(var(--muted-foreground));
  --rdg-checkbox-focus-color: hsl(var(--ring));
  --rdg-checkbox-disabled-border-color: hsl(var(--muted-foreground));
  --rdg-checkbox-disabled-background-color: hsl(var(--muted));
  --rdg-font-size: 0.888rem;
  --rdg-selection-color: hsl(var(--ring));

  border: none;
  grid-template-rows: none !important;
}

@media (max-width: 480px) {
  .rdg-cell[aria-selected="true"] {
    outline: none !important;
    background: none !important;
  }
}

.rdg-cell {
  display: flex;
  align-items: center;
  min-height: var(--rdg-header-row-height);
  border-inline-end: none;
  border-block-end: none;
}

.rdg-cell:not([role="columnheader"]) {
  border-top: 0.05rem solid var(--rdg-border-color);
}

.rdg-cell[role="columnheader"] {
  color: hsla(var(--foreground) / 0.7);
  font-weight: 600;
}

.rdg-cell.rdg-expand-cell {
  border-top-color: transparent;
}

.rdg-cell[aria-selected="true"]:not([aria-readonly="true"]) {
  background: var(--rdg-row-selected-hover-background-color);
}

.rdg-cell > input {
  border: none;
  box-shadow: none;
  background: none;
}

@media (min-width: 640px) {
  .rdg-cell:not([role="columnheader"]):not([aria-readonly="true"]):hover:after {
    content: "✎";
    display: block;
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
  }
}
