/*
Theme Name: That is Evil
Theme URI: https://thatisevil.education
Description: Twenty Twenty-Four child theme recreating the former Enfold look of That is Evil.
Template: twentytwentyfour
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: thatisevil
License: GNU General Public License v2 or later
*/

/* Most styling lives in theme.json; this file holds what theme.json cannot express. */

/* Sticky header (theme.json "position: sticky" only works inside the template part wrapper). */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}
.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}
@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part {
		top: 0;
	}
}

/* Main navigation: uppercase, active item underlined in the primary colour. */
.tie-main-nav .wp-block-navigation-item__content {
	padding-block: 0.9rem;
	border-bottom: 2px solid transparent;
}
.tie-main-nav .current-menu-item > .wp-block-navigation-item__content,
.tie-main-nav .wp-block-navigation-item__content:hover {
	border-bottom-color: var(--wp--preset--color--accent);
}
/* Mobile overlay menu: padded like the page, larger tap targets. */
.tie-main-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--20) clamp(1rem, 3vw, 2.5rem);
}
.tie-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: var(--wp--preset--spacing--40);
}
.tie-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--10);
}
.tie-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding-block: 0.4rem;
	border-bottom: 0;
	font-size: 1rem;
}

/* Body text is justified, as on the old site. */
.wp-block-post-content p,
.tie-card .wp-block-post-excerpt__excerpt {
	text-align: justify;
}

/* Content + sidebar layout. */
.tie-sidebar {
	border-left: 1px solid var(--wp--preset--color--border);
}
@media (max-width: 781px) {
	.tie-sidebar {
		border-left: 0;
		border-top: 1px solid var(--wp--preset--color--border);
		padding-top: var(--wp--preset--spacing--40);
	}
}
.tie-sidebar .wp-block-heading {
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.tie-sidebar .wp-block-categories-list {
	list-style: none;
	padding-left: 0;
}
.tie-sidebar .wp-block-categories-list a {
	color: var(--wp--preset--color--contrast-2);
	text-decoration: none;
}
.tie-sidebar .wp-block-categories-list a:hover {
	color: var(--wp--preset--color--accent);
}

/* Post cards (home page blog section and archives). */
.tie-cards .wp-block-post {
	display: flex;
}
.tie-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
}
.tie-card .wp-block-post-featured-image {
	margin: 0;
}
.tie-card .wp-block-post-excerpt {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.tie-card .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* "Read more" rendered as an outlined pill, pinned to the bottom of the card. */
.tie-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--20);
	text-align: center;
}
.tie-card .wp-block-post-excerpt__more-link {
	display: inline-block;
	min-width: 156px;
	padding: 0.45rem 1.5rem;
	border: 1px solid var(--wp--preset--color--accent-3);
	border-radius: 20px;
	color: var(--wp--preset--color--accent-3);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}
.tie-card .wp-block-post-excerpt__more-link:hover {
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
}

/* Section titles such as BLOG / OFFER. */
.is-style-tie-section-title {
	font-weight: 300;
	letter-spacing: 0.04em;
}

/* Offer list: red check marks instead of bullets. */
.is-style-tie-checklist {
	list-style: none;
	padding-left: 0;
}
.is-style-tie-checklist li {
	position: relative;
	padding-left: 1.75em;
	margin-bottom: 0.6em;
}
.is-style-tie-checklist li::before {
	content: "\2714";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent-4);
	font-style: normal;
}

/* Hide on phones (e.g. the home page hero image, as before). */
@media (max-width: 781px) {
	.tie-hide-mobile {
		display: none !important;
	}
}

/* Footer links inherit the light text colour. */
.tie-footer a {
	color: inherit;
}

/* Enfold highlighted bold text in the primary colour. */
.wp-block-post-content strong {
	color: var(--wp--preset--color--accent);
}

/* Sections butt directly against the footer, as before. */
footer.wp-block-template-part {
	margin-block-start: 0;
}

/* Contact Form 7, styled like Enfold's contact form. */
.wpcf7 label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.4rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--base-2);
	font: inherit;
	font-weight: 400;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus {
	outline: 1px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--base);
}
.wpcf7 .wpcf7-quiz-label {
	display: block;
	margin-top: 0.4rem;
	font-weight: 400;
}
.wpcf7 input[type="submit"] {
	padding: 0.9rem 2.75rem;
	border: 0;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--accent-2);
}

/* Cookie Notice banner uses the site font. */
#cookie-notice,
#cookie-notice .cn-button {
	font-family: inherit;
}
