/*
 * Global base styles: page background and interaction tweaks.
 */

/* Page background: the design system's light gray-blue (poparide-client --navy-100, #f1f4f8). The white header, footer and
   post cards sit on it. Overrides custom.css, which set body (and the single post pages) to plain white. */
body,
body.single-post {
	background-color: #f1f4f8;
}

/*
 * Global interaction tweaks.
 *
 * main.css gives every link a thick browser-default focus ring (a:focus { outline: 5px auto … }), which shows as
 * a blue box around a link after it is clicked or tapped, and mobile browsers add their own blue tap highlight.
 * Neither is shown for mouse / touch any more. Keyboard users still get a clear focus ring (:focus-visible).
 */

html {
	-webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus {
	outline: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid #4aa6db;
	outline-offset: 2px;
}

/* The right caret from the Poparide mobile app (assets/images/chevron-right.svg), used for "Continue reading" and
   the pagination arrows. Drawn as a mask so it takes the text color; .chevron--prev mirrors it. */
.chevron {
	display: block;
	flex-shrink: 0;
	width: 10px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("../images/chevron-right.svg") center / contain no-repeat;
	mask: url("../images/chevron-right.svg") center / contain no-repeat;
}

.chevron--prev {
	transform: scaleX(-1);
}

.chevron--down {
	transform: rotate(90deg);
}

/*
 * Text links: hovering makes the text semi-bold (600) and navy (design system --color-primary, #183154), with no hover underline.
 * main.css underlines every link on hover and focus (Bootstrap default). Covered: links in the post body, the category
 * menu on the index page, related articles, and (in footer.css) the footer links. Buttons, the header, the pagination,
 * the tag pills and "Continue reading" keep their own hover styles. Links inside post content stay underlined at rest.
 */
.entry-content a:not(.cta-link):not(.wp-block-button__link):hover,
.entry-content a:not(.cta-link):not(.wp-block-button__link):focus-visible,
#index-categories li a:hover,
#index-categories li a:focus-visible,
.related-posts-list a:hover,
.related-posts-list a:focus-visible {
	color: #183154;
	font-weight: 600;
}

#index-categories li a:hover,
#index-categories li a:focus,
.related-posts-list a:hover,
.related-posts-list a:focus {
	text-decoration: none;
}

/* The category menu has no underline at all: main.css gives every link a dotted bottom border. */
#index-categories li a {
	border-bottom: 0;
}
