/**
 * Townary shared text links.
 *
 * Unclassed anchors receive the common text-link treatment.
 * Component-specific navigation, card, logo, and button styles retain
 * priority through their class selectors.
 */
:root {
    --townary-text-link-color: var(--townary-navy);
    --townary-text-link-hover-color: var(--townary-red);
    --townary-text-link-underline-color: rgba(8, 47, 99, 0.42);
}

a:where([href]:not([class])),
.townary-text-link,
[data-townary-link="text"],
.townary-information-page__content a {
    color: var(--townary-text-link-color);
    text-decoration-line: underline;
    text-decoration-color:
        var(--townary-text-link-underline-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-skip-ink: auto;
    transition:
        color 160ms ease,
        text-decoration-color 160ms ease;
}

a:where([href]:not([class])):visited,
.townary-text-link:visited,
[data-townary-link="text"]:visited,
.townary-information-page__content a:visited {
    color: var(--townary-text-link-color);
}

a:where([href]:not([class])):hover,
a:where([href]:not([class])):focus-visible,
.townary-text-link:hover,
.townary-text-link:focus-visible,
[data-townary-link="text"]:hover,
[data-townary-link="text"]:focus-visible,
.townary-information-page__content a:hover,
.townary-information-page__content a:focus-visible {
    color: var(--townary-text-link-hover-color);
    text-decoration-color: currentColor;
}

a:where([href]:not([class])):focus-visible,
.townary-text-link:focus-visible,
[data-townary-link="text"]:focus-visible,
.townary-information-page__content a:focus-visible {
    outline: 2px solid var(--townary-text-link-hover-color);
    outline-offset: 3px;
}
