$nav-tabs-active-border-height: $fhi-core-px * 3;

.nav-tabs {
    .nav-item {
        margin-bottom: $fhi-core-space-2;
        margin-bottom: 0;
    }

    .nav-link {
        border-top: $nav-tabs-active-border-height solid transparent;
        border-bottom: 0;

        font-size: $fhi-core-font-size-3;
        position: relative;

        &::before {
            content: "";
            height: $nav-tabs-active-border-height;
            left: 50%;
            max-width: $fhi-core-px * 54;
            position: absolute;
            top: $nav-tabs-active-border-height * -1;
            transform: translateX(-50%);
            width: 100%;
        }

        &,
        &.active {
            color: $body-color;
        }

        &.active {
            border-top-color: transparent;
            font-weight: 700;

            &::before {
                background-color: $fhi-core-red-1;
            }
        }

        &:hover:not(.active) {
            background-color: $fhi-core-grey-light-2;
        }
    }
}

@include media-breakpoint-down(sm) {
    .nav-tabs {
        .nav-link.active {
            background-color: $fhi-core-grey-light-2;
        }
    }
}
