/* Shared Torre Sever text links, including generated provider contacts. */
:root {
    --torre-link-color: #8d4d2d;
    --torre-link-hover-color: #6a381f;
}

/* Button, navigation and social-icon links keep their component contrast. */
body:not(.wp-admin) a[href]:any-link:not(:where(
    .btn, .button, .elementor-button, .wp-element-button, .nav-link,
    .elementor-item, .elementor-sub-item, .elementor-social-icon,
    .text-white, .text-light, [role="button"], [role="tab"]
)) {
    color: var(--torre-link-color) !important;
    text-decoration-color: currentColor;
    text-underline-offset: 0.18em;
}

body:not(.wp-admin) a[href]:any-link:not(:where(
    .btn, .button, .elementor-button, .wp-element-button, .nav-link,
    .elementor-item, .elementor-sub-item, .elementor-social-icon,
    .text-white, .text-light, [role="button"], [role="tab"]
)):is(:hover, :focus-visible, :active) {
    color: var(--torre-link-hover-color) !important;
    text-decoration: underline;
}

body:not(.wp-admin) a[href]:focus-visible {
    outline: 2px solid var(--torre-link-color);
    outline-offset: 3px;
}

/* Provider templates use Bootstrap's red icon utility inside contact links. */
body:not(.wp-admin) a[href] :is(.text-danger, .text-primary, .text-info) {
    color: inherit !important;
}

/* Keep text links legible on the site's dark surfaces. */
:where(.bg-dark, .text-bg-dark, [data-link-surface="dark"]) {
    --torre-link-color: #ead4b7;
    --torre-link-hover-color: #ffffff;
}
