@use "../../../../styles/colors.scss";
@use "../../../../styles/spacing.scss";

$row-padding-condensed: spacing.$spacing-1;
$row-padding-standard: spacing.$spacing-2;
$row-padding-tooltip: spacing.$spacing-1;

.container {
  --row-padding-left: 0;
  --row-padding-left: 0;
  --row-padding-right: 0;
  --row-padding-y: #{$row-padding-standard};
  --cell-border-bottom: 1px solid white;
  --cell-background: transparent;
  --cell-foreground: black;
  --cell-padding: #{spacing.$spacing-2};
  --icon-bg: transparent;
  --icon-fg: var(--election-palette-inlineViz);
  --vote-bar-fill: var(--election-palette-inlineViz);
  --parenthetical-color: #{colors.$warmgray-50};

  position: relative;
  display: grid;

  &.has-x-padding {
    --row-padding-left: #{spacing.$spacing-1};
    --row-padding-right: #{spacing.$spacing-1};
  }

  &.medium {
    &.has-x-padding {
      --row-padding-left: #{spacing.$spacing-1};
      --row-padding-right: #{spacing.$spacing-1};
    }
  }

  &.large {
    &.has-x-padding {
      --row-padding-left: #{spacing.$spacing-1};
      --row-padding-right: #{spacing.$spacing-2};
    }
  }

  &.highlighted {
    --cell-background: var(--election-palette-bgDefault);
    --cell-foreground: var(--election-palette-fgDefault);
    --parenthetical-color: var(--election-palette-fgDefaultMuted);
    --icon-bg: var(--election-palette-main);
    --icon-fg: white;
  }

  &.vote-bar-hidden {
    --vote-bar-fill: transparent;
  }

  &.has-border-bottom {
    --cell-border-bottom: 1px solid #{colors.$warmgray-20};
  }

  &.condensed {
    --row-padding-y: #{$row-padding-condensed};
  }

  &.tooltip {
    --row-padding-y: #{$row-padding-tooltip};
  }

  &.is-not-first-row {
    :global(.int-style-CandidateVotesPctSign),
    :global(.int-style-AggregateCandidateVotesPctSign) {
      color: transparent;
    }
  }
}
