/**
 * Bootstrap buttons
 */

@use "../settings" as *;
@use "../tools" as *;

@import "bootstrap/scss/buttons";

/* Override Bootstrap mixin setting of transparent for outline buttons to be solid white (subject to contrast) */
@each $color, $value in $theme-colors {
  .btn-outline-#{$color} {
    &,
    &.disabled,
    &:disabled {
      background-color: color-contrast($value);
    }
  }
}

.btn-search {
  @include button-variant(
    $brand-color,
    $brand-color,
    $white,
    $white,
    $brand-color,
    $brand-color,
    $white,
    $brand-color,
    $brand-color
  );

  width: 2em;
  background-image: escape-svg($uoe-btn-search-icon);
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 45%;

  &:hover,
  &:active,
  &:focus {
    background-image: escape-svg($uoe-btn-search-icon-active);
  }
}

.btn-contact {
  @include button-variant($brand-color, $brand-color);
  display: block;
  margin-bottom: $breadcrumb-margin-bottom;
  @include font-size($breadcrumb-font-size);
  line-height: $line-height-base;
  border-width: 0;
  @include padding-left(space(6));
  @include padding-right(space(6));

  @include media-breakpoint-up(md) {
    margin-top: $main-content-spacer;
  }
}
