/*
Theme Name: [Client] Child Theme
Theme URI: https://rush.example/
Author: Rush
Author URI: https://rush.example/
Description: Client child theme for Rush Bedrock. Override brand tokens in theme.json; optional client patterns in patterns/. Parent rush-theme is updated independently.
Version: 1.0.25
Template: rush-theme
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rush-child
Tags: full-site-editing, block-patterns
*/

/*
 * Brand / client-only CSS.
 * Header/footer shell: parent assets/css/header-footer.css.
 * Override markup via parts/header.php and parts/footer.php in this child.
 */

/* —— News single (front + editor via add_editor_style) —— */
.rush-single-news__header {
	display: flex;
	flex-direction: column;
	gap: var(--wp--custom--spacing--8, 2rem);
}

.rush-single-news__intro {
	display: flex;
	flex-direction: column;
	gap: var(--wp--custom--spacing--5, 1.25rem);
}

.rush-single-news__meta {
	color: var(--wp--preset--color--secondary, #737373);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.rush-single-news__terms:not(:empty)::before {
	content: "·";
	margin-right: 0.5rem;
	color: var(--wp--preset--color--secondary, #737373);
}

.rush-single-news__meta .wp-block-post-terms,
.rush-single-news__terms {
	color: inherit;
}

/* Editor still outputs <a>; look and behave like plain text */
.rush-single-news__meta .wp-block-post-terms a,
.rush-single-news__terms a,
.editor-styles-wrapper .rush-single-news .wp-block-post-terms a,
.block-editor-iframe__body .rush-single-news .wp-block-post-terms a {
	color: inherit !important;
	text-decoration: none !important;
	pointer-events: none;
	cursor: default;
}

.rush-single-news__intro .wp-block-post-excerpt {
	margin-top: 0;
}

.rush-single-news__intro .wp-block-post-excerpt__excerpt,
.rush-single-news__intro .wp-block-post-excerpt p {
	margin: 0;
}

/*
 * Spacing: excerpt → image 2rem; image → content 3rem.
 * Parent blockGap is 0 so these margins are the only source.
 */
.rush-single-news__media,
.rush-single-news .wp-block-post-featured-image.rush-single-news__media {
	margin-top: var(--wp--custom--spacing--8, 2rem) !important;
	margin-bottom: 0;
	margin-left: 0;
	margin-right: 0;
}

.rush-single-news__content,
.rush-single-news .wp-block-post-content {
	margin-top: var(--wp--custom--spacing--12, 3rem);
}

/* No “read more” on news singles (front + editor placeholder) */
.rush-single-news .wp-block-post-excerpt__more-text,
.rush-single-news .wp-block-post-excerpt__more-link {
	display: none !important;
}

.rush-single-news .wp-block-post-featured-image img,
.rush-single-news__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--lg, 1rem);
}

/* Editor canvas: match front-end single layout when template is visible */
.editor-styles-wrapper .rush-single-news,
.block-editor-iframe__body .rush-single-news {
	box-sizing: border-box;
}

.editor-styles-wrapper .rush-single-news .wp-block-post-title,
.block-editor-iframe__body .rush-single-news .wp-block-post-title {
	font-size: var(--wp--custom--font-size--display, 3rem);
	line-height: 1.15;
	margin: 0;
}

.editor-styles-wrapper .rush-single-news__meta,
.block-editor-iframe__body .rush-single-news__meta {
	color: var(--wp--preset--color--secondary, #737373);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.editor-styles-wrapper .rush-single-news .wp-block-post-featured-image,
.block-editor-iframe__body .rush-single-news .wp-block-post-featured-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg, 1rem);
	margin-top: var(--wp--custom--spacing--8, 2rem) !important;
}

.editor-styles-wrapper .rush-single-news .wp-block-post-excerpt__more-text,
.editor-styles-wrapper .rush-single-news .wp-block-post-excerpt__more-link,
.block-editor-iframe__body .rush-single-news .wp-block-post-excerpt__more-text,
.block-editor-iframe__body .rush-single-news .wp-block-post-excerpt__more-link {
	display: none !important;
}

.editor-styles-wrapper .rush-single-news .wp-block-post-content,
.block-editor-iframe__body .rush-single-news .wp-block-post-content,
.editor-styles-wrapper .rush-single-news .is-root-container,
.block-editor-iframe__body .rush-single-news .is-root-container {
	max-width: var(--wp--style--global--content-size, 720px);
	margin-left: auto;
	margin-right: auto;
}

/*
 * Front-end Edit: right-edge tab. Extra 5px sits off-screen (right: -5px),
 * hover slides it in (right: 0). Always white — parent hover green is overridden.
 */
.edit--this--post {
	position: fixed !important;
	top: calc(50% + 3rem) !important;
	right: -5px !important;
	bottom: auto !important;
	left: auto !important;
	z-index: 100000;
	margin: 0;
	padding: 0.75rem 2.5rem calc(0.75rem + 5px) 1.25rem !important;
	color: #000 !important;
	font-size: 12px !important;
	line-height: 1 !important;
	font-weight: 500 !important;
	text-decoration: none !important;
	background-color: #fff !important;
	border-radius: 0.5rem 0.5rem 0 0 !important;
	box-shadow: 0 4px 22px rgba(0, 0, 0, 0.28);
	writing-mode: horizontal-tb;
	text-orientation: mixed;
	transform: rotate(-90deg);
	transform-origin: right bottom;
	transition: right 0.25s;
}

.edit--this--post::after {
	display: block !important;
	top: 7px !important;
	right: 0.75rem !important;
	left: auto !important;
	width: 14px !important;
	height: 14px !important;
	transform: none;
	background-color: #000 !important;
	mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 20.0001H20M4 20.0001V16.0001L12 8.00012M4 20.0001L8 20.0001L16 12.0001M12 8.00012L14.8686 5.13146L14.8704 5.12976C15.2652 4.73488 15.463 4.53709 15.691 4.46301C15.8919 4.39775 16.1082 4.39775 16.3091 4.46301C16.5369 4.53704 16.7345 4.7346 17.1288 5.12892L18.8686 6.86872C19.2646 7.26474 19.4627 7.46284 19.5369 7.69117C19.6022 7.89201 19.6021 8.10835 19.5369 8.3092C19.4628 8.53736 19.265 8.73516 18.8695 9.13061L18.8686 9.13146L16 12.0001M12 8.00012L16 12.0001' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 50% 50% !important;
	mask-size: contain !important;
	-webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 20.0001H20M4 20.0001V16.0001L12 8.00012M4 20.0001L8 20.0001L16 12.0001M12 8.00012L14.8686 5.13146L14.8704 5.12976C15.2652 4.73488 15.463 4.53709 15.691 4.46301C15.8919 4.39775 16.1082 4.39775 16.3091 4.46301C16.5369 4.53704 16.7345 4.7346 17.1288 5.12892L18.8686 6.86872C19.2646 7.26474 19.4627 7.46284 19.5369 7.69117C19.6022 7.89201 19.6021 8.10835 19.5369 8.3092C19.4628 8.53736 19.265 8.73516 18.8695 9.13061L18.8686 9.13146L16 12.0001M12 8.00012L16 12.0001' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 50% 50% !important;
	-webkit-mask-size: contain !important;
}

.edit--this--post:hover {
	right: 0 !important;
	background-color: #fff !important;
}
