/**
 * Classic slot: content templates (owner C). Loaded on every page, after the theme CSS.
 *
 * Rules the classic templates need that the copied design CSS and the generated files do not hold:
 * 1. WordPress 7.1 CSS of the comment blocks (core/comment-template, avatar, comment-content,
 *    comments-pagination, term-description) and the layout containers of the comment cards: the
 *    foundation generated core-blocks.css / block-supports.css from site-next pages without
 *    comments. Copied from site-next's wp-includes/blocks/<block>/style.min.css and the
 *    core-block-supports inline CSS of a post with comments.
 * 2. The comment pages, the paged-post links and the closed-comments note.
 * 3. Awards and certificates (single-team.php, single-clients.php; no site-next page): the medal or
 *    badge on a white honeycomb hexagon with the honey offset hexagon, in the band's media column.
 * 4. Award and certificate lists (/team/, /clients/: index.php post cards): whole images, not 3:2 crops.
 * 5. The Events Calendar's views (/events/): the view at the wide size under the band.
 * 6. Empty blocks the editor left in the content (end of post 3881: an empty paragraph, gallery,
 *    preformatted block and button) print nothing, as on site-next whose content was cleaned.
 * 7. Lists the classic editor wrote (no class) keep site-next's content-box sizing.
 *
 * @package Revita_Classic
 */

/* 1. WordPress 7.1 comment block CSS (site-next wp-includes/blocks/<block>/style.min.css). */
.wp-block-avatar {
	line-height: 0;
}

.wp-block-avatar,
.wp-block-avatar img {
	box-sizing: border-box;
}

.comment-awaiting-moderation {
	display: block;
	font-size: 0.875em;
	line-height: 1.5;
}

.wp-block-comment-author-name,
.wp-block-comment-date,
.wp-block-comment-content,
.wp-block-comment-reply-link,
.wp-block-comments {
	box-sizing: border-box;
}

.wp-block-comment-template {
	box-sizing: border-box;
	list-style: none;
	margin-bottom: 0;
	max-width: 100%;
	padding: 0;
}

.wp-block-comment-template li {
	clear: both;
}

.wp-block-comment-template ol {
	list-style: none;
	margin-bottom: 0;
	max-width: 100%;
	padding-left: 2rem;
}

:where(.wp-block-term-description) {
	box-sizing: border-box;
	margin-bottom: var(--wp--style--block-gap);
	margin-top: var(--wp--style--block-gap);
}

.wp-block-term-description p {
	margin-bottom: 0;
	margin-top: 0;
}

/* Layout containers of the comment card (hidden-comments: flex row, body flow, meta row, actions row). */
.wp-container-core-group-is-layout-f7c7607f {
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--30);
	align-items: flex-start;
}

.wp-container-core-group-is-layout-d8e9a658 > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.wp-container-core-group-is-layout-d8e9a658 > * + * {
	margin-block-start: var(--wp--preset--spacing--10);
	margin-block-end: 0;
}

.wp-container-core-group-is-layout-05ccefae {
	gap: var(--wp--preset--spacing--20);
	align-items: center;
}

.wp-container-core-group-is-layout-ddb802dc {
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--30);
}

/* 2. Comment pages (core/comments-pagination), paged posts and closed comments. */
.wp-block-comments-pagination.revita-comments__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	margin-block: var(--wp--preset--spacing--40);
}

.revita-comments__pagination .page-numbers {
	padding: 0.4em 0.75em;
}

.revita-comments__pagination .wp-block-comments-pagination-previous-arrow {
	margin-inline-end: 1ch;
}

.revita-comments__pagination .wp-block-comments-pagination-next-arrow {
	margin-inline-start: 1ch;
}

.revita-comments__closed {
	color: var(--wp--preset--color--muted);
}

/* The empty state's search field shows the theme ring on keyboard focus, as the band's does
 * (core removes the field's own outline inside the pill; site-next shows no ring here). */
.revita-empty-state :focus-visible {
	outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep));
	outline-offset: 3px;
}

.revita-page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin-block-start: var(--wp--preset--spacing--50);
	font-weight: 600;
}

.revita-page-links > a,
.revita-page-links > .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 2.75rem;
	min-block-size: 2.75rem;
	border-radius: var(--wp--custom--radius--pill);
}

.revita-page-links > a {
	background-color: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--primary-deep);
	text-decoration: none;
}

/* 3. Award medal and certificate badge on a white honeycomb hexagon (single-team / single-clients). */
.revita-badge-media {
	position: relative;
	isolation: isolate;
	display: grid;
	place-items: center;
	inline-size: min(100%, 22rem);
	aspect-ratio: 1.1547;
	margin: 0 auto;
}

.revita-badge-media::before,
.revita-badge-media::after {
	content: "";
	position: absolute;
	-webkit-mask: url("../../images/hexagon.svg") center / 100% 100% no-repeat;
	mask: url("../../images/hexagon.svg") center / 100% 100% no-repeat;
}

.revita-badge-media::before {
	z-index: -1;
	inset: 0;
	background: url("../../images/honeycomb-purple.svg") 0 0 / 84px 48px, var(--wp--preset--color--base);
}

.revita-badge-media::after {
	z-index: -2;
	inset: 8% -6% -8% 6%;
	background: var(--wp--preset--gradient--honey);
}

.revita-badge-media img {
	display: block;
	inline-size: auto;
	max-inline-size: 58%;
	block-size: auto;
	max-block-size: 74%;
	object-fit: contain;
}

.revita-badge-media--small {
	inline-size: min(100%, 15rem);
}

/* The award band keeps the media column beside the text from 782px, as the health-article band. */
@media (min-width: 782px) {
	:is(.revita-page-header--award, .revita-page-header--certificate) .wp-block-post-featured-image.revita-service-hero__image {
		margin-block-end: 0;
	}
}

.revita-back-link {
	padding-inline: var(--wp--style--root--padding-left);
}

/* 4. Award and certificate lists: the medal or badge whole on cream, as product packshots. */
.wp-block-post:is(.type-team, .type-clients) .wp-block-post-featured-image.revita-post-card__media {
	background-color: var(--wp--preset--color--cream);
}

.wp-block-post:is(.type-team, .type-clients) .revita-post-card__media img {
	box-sizing: border-box;
	padding: 8%;
	object-fit: contain !important;
	mix-blend-mode: multiply;
}

/* 5. The Events Calendar 5.4 (views v2, its own template under the theme's header and band): the view
 * at the wide size, the design's fonts, a honey pill for the search button, purple links and a
 * lavender notice. The calendar's own layout stays; no event exists today. */
main.wp-block-group > :is(.tribe-common, .tribe-events-pg-template, #tribe-events-pg-template) {
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: var(--wp--style--global--wide-size) !important;
	margin-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--80);
}

main .tribe-common.tribe-events .tribe-common-l-container {
	padding: 0;
}

main .tribe-common.tribe-events,
main .tribe-common.tribe-events :is(p, span, a, button, input, label, li, time, div) {
	font-family: var(--wp--preset--font-family--body);
}

main .tribe-common.tribe-events :is(h1, h2, h3, .tribe-common-h1, .tribe-common-h2, .tribe-common-h3, .tribe-common-h4, .tribe-common-h5, .tribe-common-h6, .tribe-common-h7, .tribe-common-h8, .tribe-events-c-top-bar__datepicker-desktop, .tribe-events-c-top-bar__datepicker-mobile) {
	color: var(--wp--preset--color--primary-deep);
	font-family: var(--wp--preset--font-family--heading);
}

main .tribe-common.tribe-events .tribe-common-c-btn {
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-deep);
	font-weight: 700;
}

main .tribe-common.tribe-events .tribe-common-c-btn:is(:hover, :focus) {
	background-color: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--primary-deep);
}

main .tribe-common.tribe-events :is(.tribe-events-c-ical__link, .tribe-events-c-subscribe-dropdown__button) {
	border-color: var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--primary);
}

main .tribe-common.tribe-events :is(.tribe-events-c-ical__link, .tribe-events-c-subscribe-dropdown__button):is(:hover, :focus) {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

main .tribe-common.tribe-events .tribe-events-c-messages__message {
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--primary-deep);
}

main .tribe-common.tribe-events :focus-visible {
	outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep));
	outline-offset: 3px;
}

/* 6. Empty content blocks print nothing (one rule each, so a browser without :has() keeps the others).
 * Empty paragraphs only as blocks of the content (WordPress or Elementor's text widget), not inside
 * WPBakery's columns (classic/compat.css hides those). Post 3881 ends with an empty preformatted
 * block, a button without text and a gallery without images. The single place for these rules
 * (classic/compat.css had a second copy for Elementor's text widget; merged here by the integrator). */
.revita-article > p:empty,
.revita-article .elementor-widget-container > p:empty,
.revita-article pre:empty,
.revita-article .wp-block-button__link:empty,
.revita-article .blocks-gallery-grid:empty {
	display: none;
}

.revita-article .wp-block-gallery:not(:has(img)) {
	display: none;
}

.revita-article .wp-block-button:has(> .wp-block-button__link:empty) {
	display: none;
}

.revita-article .wp-block-buttons:not(:has(.wp-block-button__link:not(:empty))) {
	display: none;
}

/* 7. Plain lists straight in the article column (the classic editor's <ul>/<ol> without a class: health
 * articles 127-143 and 1019-1041) keep the content-box sizing they have on site-next. generated/core-blocks.css
 * prints WordPress 7.1's "ol,ul{box-sizing:border-box}" on every page; site-next prints it only on pages with a
 * list block, and no content page has one. So on site-next the list box is the 760px column plus the 40px marker
 * indent (800px, centred): the markers sit at the paragraphs' edge and the text is 760px wide, not 720px wide and
 * 40px in (finding visual-content-RVC-1). It shows from about 800px viewport width (fully from about 840px);
 * narrower screens do not change. Lists with a class (blocks, design patterns) and lists inside WPBakery or
 * Elementor wrappers (classic/compat.css) are not touched. */
.revita-article > :is(ul, ol):not([class]) {
	box-sizing: content-box;
}
