/*
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.0
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 images on single posts break out of the text column to the right
   on wider screens. The figure is floated right and its right edge sits 250px past the
   right edge of the (645px) content column, with text wrapping to its left.
   Overrides the inline width:50% the editor sets on alignright figures. */
@media (min-width: 1200px) {
	body.single .wp-block-post-content .wp-block-image.alignright {
		float: right !important;
		width: 480px !important;
		max-width: none !important;
		margin-left: 1.5em !important;
		margin-right: -220px !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;
	}
}
