/* stylelint-disable */

@use "sass:math";
@use "tools/a11y";
@use "tools/colour";
@use "tools/media";
@use "tools/spacing";

a,
button,
input,
textarea,
select,
summary {
  &:focus {
    z-index: 9;

    @include a11y.focus-outline;
  }
}

.tna-checkboxes,
.tna-radios {
  &__item {
    input {
      width: 1.5rem;
      height: 1.5rem;

      display: inline-block;

      position: static;

      vertical-align: middle;

      opacity: 1;
    }
  }

  &__item-label {
    display: inline-block;
  }
}

.tna-compound-filters {
  &__link {
    &::before,
    &::after {
      border-left: 2px #010101 solid !important;
    }
  }
}

.tna-index-grid {
  &__item-image {
    height: 100%;
  }

  &__item-content {
    flex: auto;
  }
}

.tna-button {
  svg {
    display: none;
  }
}

.tna-global-header__logo--link,
.tna-global-header__navigation-item-link,
.tna-header__logo-contents--link,
.tna-header__navigation-item-link {
  &,
  &:link,
  &:visited {
    color: #fff;
  }
}

.tna-global-header__navigation-item-link {
  border-bottom: 1px rgba(255, 255, 255, 0.5) solid;
}

@include media.on-larger-than-mobile {
  .tna-header__navigation-item {
    & + & {
      margin-left: 2rem;
    }
  }
}

.tna-global-header__top-navigation-item {
  & + & {
    margin-left: 2rem;
  }
}

.tna-global-header__top-navigation-link,
.tna-header__top-navigation-item-link {
  &,
  &:link,
  &:visited {
    color: rgba(255, 255, 255, 0.58);

    &,
    &:focus {
      color: #fff;
    }
  }
}

.tna-footer {
  .tna-logo {
    height: 96px;
  }

  &__licence-logo {
    height: 24px;
  }

  &__govuk-logotype-crown {
    height: 30px;
  }
}

@mixin horizontal-card-layout($modifierClass, $innerPaddingAmount) {
  &#{$modifierClass} {
    padding-left: 50%;
  }

  &#{$modifierClass}#{&}--flipped {
    padding-right: 50%;
    padding-left: 0;
  }

  &#{$modifierClass} &__image-container {
    width: 50%;

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
  }
}

.tna-card {
  &__image-container {
    margin-bottom: spacing.space(1);
    padding-bottom: #{math.div(2, 3) * 100%};
  }

  &__image {
    width: 100%;
    height: 100%;
  }

  &__heading-link {
    &::after {
      display: none !important;
    }
  }

  @include media.on-larger-than-mobile {
    @include horizontal-card-layout("--horizontal", 2);
  }

  @include media.on-small {
    @include horizontal-card-layout("--horizontal-on-small", 1);
  }
}

.tna-columns {
  column-count: 1 !important;
}

.tna-breadcrumbs {
  &__link {
    color: #343338;
  }
}

.tna-sidebar {
  &--sticky {
    display: block;
  }
}

.tna-hero {
  &__image {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
  }

  &__information,
  &__content-inner {
    background: #fff;
  }
}

.tna-files-list {
  &__icon {
    height: 3rem;
  }
}

.tna-form-item {
  display: block;
}

.tna-form-item__contents {
  flex: none;
}

.tna-chip {
  background: #fff;
}
