/* Sitewide overrides loaded after Blocksy's generated CSS (inc/site.php). */

/* One orange for buttons and links that white text and white backgrounds can carry (5.2:1 and 5.6:1). */
:root {
	--theme-text-color: #3d454b;
	--theme-link-initial-color: #b93d0a;
	--theme-link-hover-color: #8f2f08;
	--theme-button-background-initial-color: #c2410c;
	--theme-button-background-hover-color: #a8380a;
}

/* Book and recipe accents from style.css use the theme's bright orange; white text on it needs the darker one. */
.paleo-recipe-card__method li::before,
.paleo-chapters details.is-active {
	background: #c2410c;
}

.paleo-recipe-card__print {
	border-color: #c2410c;
	color: #a8380a;
}

.paleo-chapters summary:hover {
	color: #a8380a;
}

/* Shorter title photos on articles, and much shorter banners on listing pages, so the content starts sooner. */
.single-post .hero-section[data-type="type-2"] {
	--container-padding: 110px 0;
	--min-height: 0px;
}

.blog .hero-section[data-type="type-2"],
.archive .hero-section[data-type="type-2"],
.post-type-archive-product .hero-section[data-type="type-2"],
.tax-product_cat .hero-section[data-type="type-2"] {
	--container-padding: 60px 0;
	--min-height: 240px;
}

/* Recipe listings: the /artiklid/ banner (title sizes from its Blocksy settings) on a plain colour white text
   reads on (6:1), the intro below it. */
.paleo-recipe-listing .hero-section[data-type="type-2"] {
	background-color: #a8380a;
}

.paleo-recipe-listing .hero-section[data-type="type-2"] .page-title {
	color: #fff;
	font-size: 90px;
}

.paleo-recipe-listing .hero-section[data-type="type-2"] .page-description {
	display: none;
}

/* Card titles as on /artiklid/ (Blocksy writes the blog's card font for blog pages only). */
.paleo-recipe-listing .entries .entry-title {
	font-size: 30px;
	line-height: 1.3;
}

.paleo-recipe-listing__back {
	margin: 0 0 16px;
	font-size: 16px;
	text-align: center;
}

.paleo-recipe-listing__intro {
	margin-bottom: 40px;
	font-size: 18px;
	text-align: center;
}

.paleo-recipe-listing__intro p {
	max-width: 720px;
	margin: 0 auto;
}

/* /retseptid/: chapter links under the intro, and each chapter's name above its recipes. */
.paleo-recipe-chapters ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	max-width: 960px;
	margin: 0 auto 48px;
	padding: 0;
	list-style: none;
}

.paleo-recipe-chapters a {
	display: block;
	padding: 6px 14px;
	border: 1px solid #c2410c;
	border-radius: 999px;
	color: #a8380a;
	font-size: 15px;
	text-decoration: none;
}

.paleo-recipe-chapters a:hover {
	background: #c2410c;
	color: #fff;
}

.paleo-recipe-chapter-heading {
	margin: 24px 0 0;
	font-size: 32px;
}

.paleo-recipe-chapter-heading:first-child {
	margin-top: 0;
}

.paleo-recipe-chapter-heading a {
	color: inherit;
	text-decoration: none;
}

@media (max-width: 999.98px) {
	.paleo-recipe-listing .hero-section[data-type="type-2"] .page-title {
		font-size: 50px;
	}
}

/* Articles: a comfortable line length and larger text. */
.single-post:not(.paleo-recipe) .entry-content {
	font-size: 18px;
	line-height: 1.7;
}

.single-post:not(.paleo-recipe) .entry-content > *:not(.alignfull):not(.alignwide) {
	max-width: 720px;
	margin-right: auto;
	margin-left: auto;
}

/* Recipes: the recipe card has its own title, photo and summary, so the page header stays only for search
   engines and screen readers. */
.paleo-recipe .hero-section[data-type="type-2"] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.paleo-recipe .entry-content {
	padding-top: 48px;
}

@media (max-width: 689px) {
	.single-post .hero-section[data-type="type-2"] {
		--container-padding: 64px 0;
	}

	.single-post:not(.paleo-recipe) .entry-content {
		font-size: 17px;
	}
}

/* Author box at the end of articles. */
.paleo-author-box {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	margin: 2.5em auto 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--theme-palette-color-5);
	font-size: 16px;
	line-height: 1.6;
}

.paleo-author-box img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

.paleo-author-box p {
	margin: 0 0 8px;
}

.paleo-author-box__name {
	font-weight: 700;
}

@media (max-width: 689px) {
	.paleo-author-box {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 14px;
		font-size: 15px;
	}

	.paleo-author-box img {
		width: 64px;
		height: 64px;
	}
}

/* (i) with an explanation, from the [paleo_info] shortcode. */
.paleo-info {
	display: inline-block;
	position: relative;
	margin-left: 4px;
	vertical-align: middle;
}

.paleo-info summary {
	display: inline-flex;
	align-items: center;
	list-style: none;
	cursor: pointer;
}

.paleo-info summary::-webkit-details-marker {
	display: none;
}

.paleo-info__text {
	display: none;
	position: absolute;
	z-index: 20;
	bottom: calc(100% + 8px);
	left: 50%;
	width: 260px;
	padding: 10px 12px;
	transform: translateX(-50%);
	border-radius: 6px;
	background: var(--theme-palette-color-4);
	color: #fff;
	font-size: 14px;
	line-height: 1.45;
}

.paleo-info__text a {
	color: #fff;
	text-decoration: underline;
}

.paleo-info[open] .paleo-info__text {
	display: block;
}

@media (hover: hover) {
	.paleo-info:hover .paleo-info__text {
		display: block;
	}
}

/* In the product info list the bubble is anchored to the whole line, so it never runs off a narrow screen. */
.ct-product-additional-info li {
	position: relative;
}

.ct-product-additional-info .paleo-info {
	position: static;
}

.ct-product-additional-info .paleo-info__text {
	left: 0;
	width: min(320px, 100%);
	transform: none;
}
