/* Copyright 2023 The Matrix.org Foundation C.I.C.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.nav-tab {
    padding: var(--cpd-space-4x) 0;
    position: relative;
}

/* Underline effect */
.nav-tab::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    border-radius: var(--cpd-radius-pill-effect) var(--cpd-radius-pill-effect) 0 0;
    background-color: var(--cpd-color-bg-action-primary-rest);
    transition: height 0.1s ease-in-out;
}

.nav-tab[data-current]::before {
    /* This is not exactly right: designs says 3px, but there are no variables for that */
    height: var(--cpd-border-width-4);
}


.nav-item {
    padding: var(--cpd-space-1x) var(--cpd-space-2x);
    color: var(--cpd-color-text-secondary);
    line-height: var(--cpd-space-6x);
    border-radius: var(--cpd-radius-pill-effect);
    border: transparent var(--cpd-border-width-2) solid;
}

.nav-item.external-link {
    text-decoration: underline;
    color: var(--cpd-color-text-primary);
}

.nav-item:hover {
    color: var(--cpd-color-text-primary);
    background-color: var(--cpd-color-bg-subtle-secondary);
}

.nav-item:active {
    color: var(--cpd-color-text-primary);
    background-color: var(--cpd-color-bg-subtle-primary);
}

.nav-item:focus {
    outline: none;
    border-color: var(--cpd-color-border-focused);
}

.nav-item[aria-current="page"] {
    color: var(--cpd-color-text-primary);
}