/* The Feed's clickable text (inc/feed-links.php): buddypress.php (both sidebars), buddypress/activity/entry.php (intro
   and forum cards) and inc/forum-performance.php (Member Spotlights). Linked text looks as it did: it takes the font
   and colour of the text around it, over the theme's rules for links in these places (.grid-feed a, .grid-feed-txt a,
   .newsfeed-pro-txt a, .activity-header a and, on phones, .activity-item a). A pointer, an underline on hover and a
   focus ring show that it is a link. */

/* Text links. */
.ipm-feed-link,
.feed-grid a.ipm-feed-link,
.membership-feed #buddypress .activity-list .activity-item a.ipm-feed-link {
	display: inline;
	color: inherit !important;
	font: inherit !important;
	letter-spacing: inherit !important;
	text-decoration: none;
	-webkit-font-smoothing: inherit;
	-moz-osx-font-smoothing: inherit;
	cursor: pointer;
}

.ipm-feed-link:hover,
.feed-grid a.ipm-feed-link:hover,
.membership-feed #buddypress .activity-list .activity-item a.ipm-feed-link:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Profile card: Following, Followers and Posts, each row a link laid out as the row was (label left, number right). */
.nwfd-pro-bttm a.ipm-feed-row-link {
	display: flex;
	flex: 1 1 auto;
	gap: 4px;
	align-items: center;
	justify-content: space-between;
	color: inherit !important;
	font: inherit !important;
	text-decoration: none;
}

.nwfd-pro-bttm a.ipm-feed-row-link[href]:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Sidebar box headings, wrapped like the headings that were already links. */
.feed-acc-title a.ipm-feed-heading-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.feed-acc-title a.ipm-feed-heading-link:hover h2 span {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Feed cards: the flag (member's profile) and the New Member tag (Members page) are each in a link that takes their
   place in the header (.activity-header > *), without adding to the flag's own spacing. */
#activity-stream .activity-list .activity-item .activity-header > a.ipm-feed-flag-link {
	margin-right: 0;
}

.ipm-feed-flag-link,
.ipm-feed-tag-link {
	text-decoration: none;
	cursor: pointer;
}

.ipm-feed-flag-link:hover .country-flag {
	opacity: 0.8;
}

.ipm-feed-tag-link:hover .newmember-tag {
	text-decoration: underline;
}

/* Intro cards: the body links to the intro post through a link stretched over it; the links and buttons in it stay
   on top and work as before. The text turns the site's blue on hover. */
.activity-inner.ipm-feed-area {
	position: relative;
}

.ipm-feed-area > a.ipm-feed-area-link {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	display: block;
	border-radius: 4px;
}

.ipm-feed-area a:not(.ipm-feed-area-link),
.ipm-feed-area button,
.ipm-feed-area input,
.ipm-feed-area select,
.ipm-feed-area textarea,
.ipm-feed-area iframe,
.ipm-feed-area video,
.ipm-feed-area audio,
.ipm-feed-area [role="button"] {
	position: relative;
	z-index: 2;
}

.ipm-feed-area:has(> .ipm-feed-area-link:hover),
.membership-feed #buddypress .activity-list .activity-item .ipm-feed-area:has(> .ipm-feed-area-link:hover) p {
	color: var(--dark-blue, #084d92);
}

/* Featured Article: the image sits under the box's dark overlay, so a link stretched over the whole box takes the
   clicks; the title and Read more stay on top. */
.feed-articles-inn.ipm-feed-card > a.ipm-feed-card-link {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
}

.feed-articles-inn.ipm-feed-card .grid-feed-txt a {
	position: relative;
	z-index: 2;
}

.feed-articles-inn.ipm-feed-card:hover .grid-feed-txt h4 a.ipm-feed-link {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Focus ring for keyboard users. */
.ipm-feed-link:focus-visible,
.ipm-feed-row-link:focus-visible,
.ipm-feed-heading-link:focus-visible,
.ipm-feed-flag-link:focus-visible,
.ipm-feed-tag-link:focus-visible,
.ipm-feed-area > a.ipm-feed-area-link:focus-visible {
	outline: 2px solid var(--dark-blue, #084d92);
	outline-offset: 2px;
	border-radius: 2px;
}

.feed-articles .ipm-feed-link:focus-visible {
	outline-color: #fff; /* White title on the dark image. */
}
