@import "../settings.breakpoints";

@import "tools.mixins";

// Icon Sizes
// Since each icon is different widths/heights this was a solution to make them all align properly
$subscribe-sizes:  (90 41), (56 46), (60 50), (40 51);
$business-sizes:   (87 35), (80 29), (145 32), (148 36);
// This variable is used to store the height values
$subscribe-max-height: ();
$business-max-height: ();

@mixin max-height-icons($sizes, $array, $container) {
  @each $width, $height in $sizes {
    $array: append($array, $height, comma);
  }
  $max-value: max($array...);
  @each $width, $height in $sizes {
    .o-footer-tier--#{$container} .o-footer-tier__col:nth-of-type(#{index($sizes, $width $height)}) {
      .o-footer-tier__icon {
        width: rem($width);
        height: rem($height);
        min-height: rem($max-value);
        @if $container == business {
          @include mq($from: tabletMedium) {
            width: rem($width + ($width * .2));
            height: rem($height + ($height * .2));
            min-height: rem($max-value + ($max-value *.2));
          }
        }
      }
    }
  }
}
