/*
Theme Name: Twenty Twenty-Five TSAI
Theme URI: https://turmansolutions.ai/themes/twentytwentyfive-tsai/
Author: Turman Solutions
Author URI: https://turmansolutions.ai
Description: A dark variant of the Twenty Twenty-Five theme. Inherits all templates, patterns, and behavior from the parent while swapping the color palette for a dark background and light text.
Template: twentytwentyfive
Version: 0.1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfive-tsai
Tags: dark, one-column, full-site-editing, block-styles, style-variations
*/

/* Magnify on hover — featured + inline content images on single posts.
   Gated by .is-magnify-active, toggled by the corner button in assets/js/magnify.js.
   transform-origin is updated by the same script based on cursor position. */
body.single .wp-block-post-featured-image,
body.single .wp-block-post-content .wp-block-image {
	overflow: hidden;
}

body.single .wp-block-post-featured-image.is-magnify-active,
body.single .wp-block-post-content .wp-block-image.is-magnify-active {
	cursor: zoom-in;
}

body.single .wp-block-post-featured-image img,
body.single .wp-block-post-content .wp-block-image img {
	display: block;
	transition: transform 0.25s ease-out;
	will-change: transform;
}

/* Inline alignright (secondary) images on single posts. Below 1200px they span
   the full content column with no float so text stacks above/below; from 1200px
   up they float right and break out past the right edge of the (645px) column,
   with text wrapping to their left. Both override the inline width:50%/float:right
   the publishing pipeline sets on alignright figures. */
@media (max-width: 1199px) {
	body.single .wp-block-post-content .wp-block-image.alignright {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		margin-bottom: 1em !important;
	}

	body.single .wp-block-post-content .wp-block-image.alignright img {
		width: 100% !important;
		height: auto !important;
	}
}

@media (min-width: 1200px) {
	body.single .wp-block-post-content .wp-block-image.alignright {
		float: right !important;
		width: 560px !important;
		max-width: none !important;
		margin-left: 1.5em !important;
		margin-right: -240px !important;
		margin-bottom: 1em !important;
	}

	body.single .wp-block-post-content .wp-block-image.alignright img {
		width: 100% !important;
		height: auto !important;
	}
}

body.single .wp-block-post-featured-image.is-magnify-active:hover img,
body.single .wp-block-post-content .wp-block-image.is-magnify-active:hover img {
	transform: scale(2.5);
}

.tsai-magnify-toggle {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.15s ease-out, background-color 0.15s ease-out, transform 0.15s ease-out;
}

.tsai-magnify-toggle svg {
	width: 18px;
	height: 18px;
	display: block;
}

.tsai-magnify-toggle:hover,
.tsai-magnify-toggle:focus-visible {
	opacity: 1;
	outline: none;
	background: rgba(0, 0, 0, 0.75);
}

.tsai-magnify-toggle:focus-visible {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.tsai-magnify-toggle[aria-pressed="true"] {
	background: var(--wp--preset--color--accent, #f0b429);
	color: #000;
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	body.single .wp-block-post-featured-image,
	body.single .wp-block-post-content .wp-block-image {
		cursor: default;
	}
	body.single .wp-block-post-featured-image img,
	body.single .wp-block-post-content .wp-block-image img {
		transition: none;
	}
	body.single .wp-block-post-featured-image.is-magnify-active:hover img,
	body.single .wp-block-post-content .wp-block-image.is-magnify-active:hover img {
		transform: none;
	}
	.tsai-magnify-toggle {
		display: none;
	}
}
