/* :not(.btn)*/

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: var(--link-underline-offset, .15em);
}

a:visited:where(:not(.btn, .nav-link, .dropdown-item, .ph-button, .vacancy-panel-applybutton, .rd-link, .elp-card-link, .tile-news-item-title, .ph-text-link, .link--no-visited-state)) {
    color: var(--link-visited-color, #4c2c92);
}

    a:hover {
        text-decoration: underline;
        text-decoration-thickness: max(3px, .1875rem, .12em);
        text-underline-offset: var(--link-underline-offset, .15em);
        /* border-bottom: 3px solid var(--link-highlight-color);
        text-decoration-line: none;*/
        color: var(--link-highlight-color);
    }

    a:focus:not(.btn) {
        background-color: var(--focus-color);
        box-shadow: 0 -2px var(--focus-color), 0 4px var(--focus-text-color);
        color: var(--focus-text-color);
    }

    a.asterisk-base::after {
        content: "*";
        color: inherit;
    }

#advancedSearchLink {
    color: var(--link-color);
}

    #advancedSearchLink:hover {
        color: var(--link-highlight-color);
    }

#simpleSearchLink {
    color: var(--link-color);
}

    #simpleSearchLink:hover {
        color: var(--link-highlight-color);
    }

/* Links in dropdowns */
.dropdown-item.active, .dropdown-item:active {
    color: var(--bs-dropdown-link-active-color);
    text-decoration: none;
    background-color: var(--bs-dropdown-link-active-bg);
}

/* Scoped portal component styles. */
#portal-home a {
    color: var(--portal-link);
    text-underline-offset: var(--link-underline-offset, .15em);
}

#portal-home a:hover {
    color: var(--portal-link-hover);
}

#portal-home .ph-text-link {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    min-height: 44px;
}

#resident-dashboard a.rd-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    min-height: 44px;
    width: 100%;
    padding: 8px 0;
    color: var(--portal-link);
    text-decoration: underline;
    text-underline-offset: var(--link-underline-offset, .15em);
    text-decoration-thickness: 1px;
}

#resident-dashboard a.rd-link:hover {
    color: var(--portal-link-hover);
    text-decoration-thickness: 2px;
}

#resident-dashboard .rd-arrow {
    text-decoration: none;
}

/* Keep keyboard focus readable, including on the dark footer. */
:is(#portal-profile-header, #portal-profile-footer, #portal-home, #resident-dashboard) :is(a, button):focus-visible:focus {
    color: var(--focus-text-color);
    background-color: var(--focus-color);
    outline: var(--focus-outline-width, 3px) solid var(--focus-text-color);
    outline-offset: 3px;
    box-shadow: none;
    text-decoration-thickness: 2px;
}
