@use "uswds-core" as *;
@use "colors";

.analytics-select {
  &--main {
    color: colors.$white;

    select {
      background-color: colors.$palette-color-2;
      border: units(1px) solid colors.$white;
      color: colors.$white;
      margin-bottom: units(1);

      @include at-media("tablet") {
        margin-bottom: units(2);
      }
    }

    label {
      color: colors.$dark-blue;
      font-weight: font-weight(500);
      text-align: center;

      @include at-media("tablet") {
        text-align: left;
      }
    }
  }

  &--secondary {
    color: colors.$dark-gray;

    select.usa-select {
      background-color: colors.$white;
      background-image: url("../css/img/arrow-down-black.svg");
      border: units(1px) solid colors.$dark-blue;

      @include at-media("desktop-lg") {
        order: 2;
        width: 35%;
      }

      @include at-media("widescreen") {
        width: 45%;
      }
    }

    label.usa-label {
      text-align: left;
    }
  }

  label {
    max-width: none;
    vertical-align: middle;
    width: 100%;

    @include at-media("mobile-lg") {
      margin-bottom: 0;
      margin-top: units(2);
    }

    // This media size is where the header items become spaced out horizontally.
    @include at-media("tablet") {
      margin-top: 0;
    }
  }

  // style the input drop down
  .usa-form {
    max-width: 100%;
  }

  select {
    background-image: url("../css/img/arrow-down-white.svg");
    font-size: size("sans", "sm");
    font-weight: font-weight(600);
    height: auto;
    //max-width: none; // USWDS override
    vertical-align: middle;
    //width: 100%;

    @include at-media("tablet-lg") {
      font-size: size("sans", "lg");
    }
  }
}

form {
  max-width: none;
}
