@use "../../tokens/color" as *;
@use "../../tokens/font" as *;
@use "../../base/mixins";

.iati-country-switcher {
  background-color: #fff;
  position: relative;
  display: inline-block;
  color: #121212;
  cursor: pointer;
  .iati-country-switcher__label {
    @include mixins.sr-only;
  }
  .iati-country-switcher__control {
    padding: 0.7em 2.1em 0.7em calc(1em + 1rem);
    font-family: $font-stack-heading;
    line-height: 1.1;
    width: 100%;
    height: 100%;
    appearance: none;
    background-color: #fff;
    border: none;
    font-family: $font-stack-heading;
    color: $color-grey-90;
    font-weight: 600;
    background-image: url("@assets/svg/icon-globe.svg");
    background-repeat: no-repeat;
    background-position: 0.5em center;
  }
  &::after {
    position: absolute;
    right: 0.7em;
    top: calc(50% - 0.1875em);
    content: "";
    width: 0.75em;
    height: 0.375em;
    background-color: currentColor;
    clip-path: polygon(15% 0, 0 0, 50% 100%, 100% 0, 85% 0, 50% 70%);
  }

  &--compact {
    .iati-country-switcher__control {
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
    }
    &::after {
      right: 0.6875rem;
      width: 0.625rem;
      height: 0.3125rem;
    }
  }
}
