@import "tools.mixins";

@mixin c-election-live-results-sm {
  .c-election-live-results-heading,
  .c-election-live-results--complete .c-election-live-results-heading {
    @include grid-template-columns(0, 1fr auto);
    @include grid-template-rows(0, auto auto);
  }

  .c-election-live-results__party-name--full,
  .c-election-live-results__party-name--abbr {
    font-size: rem(14);
  }

  .c-election-live-results__party-seats {
    font-size: rem(32);
  }

  .c-election-live-results__full-results {
    margin-top: rem(15);
  }

  .c-election-live-results__rainbow {
    height: rem(10);
  }

  .c-election-live-results--partial,
  .c-election-live-results--complete {
    .c-election-live-results-heading__main {
      @include grid-column(1, 3);
    }

    .c-election-live-results-heading__sub {
      @include grid-column(1, 3);
      text-align: center;
    }
    .c-election-live-results__refresh {
      @include grid-column(2, 3);
      @include grid-row(1, 2);
      padding: 0;
    }

    .c-election-live-results__majority {
      @include grid-template-columns(0, 1fr auto 1fr);
      align-items: center;
    }
    .c-election-live-results__majority--chart {
      @include grid-template-columns(0, 1fr);
    }

    .c-election-live-results__majority__triangle {
      @include grid-column(2, 3);
      margin-top: rem(5);
    }

    .c-election-live-results__majority__text {
      @include grid-column(3, 4);
      text-align: left;
      padding-left: rem(5);
    }
  }

  .c-election-live-results__majority--chart {
    @include grid-template-columns(0, 1fr auto auto);
  }
}

@mixin c-election-live-results-md {
  .c-election-live-results__party-name--full {
    display: block;
  }

  .c-election-live-results__party-name--abbr {
    display: none;
  }

  .c-election-live-results__party-seats {
    padding-top: 0;
  }
}
