/*
Theme Name: RahkarTheme
Theme URI: https://rahkar.local/
Author: Rahkar
Author URI: https://rahkar.local/
Description: A production-grade, ultra-fast block-based (FSE) WordPress theme built RTL-first for Persian sites. Optimized for Nginx + PHP-FPM + Redis.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rahkartheme
Tags: full-site-editing, block-theme, rtl-language-support, custom-colors, custom-logo, wide-blocks, editor-style
*/

/*
 * Intentionally minimal. All design tokens live in theme.json (single source of truth).
 * Per-feature CSS is loaded conditionally via functions.php; do not add component styles here.
 */

/*
 * No site-wide horizontal-overflow clip.
 *
 *   Earlier revisions added `overflow-x: clip` here (first on html/body,
 *   then on .wp-site-blocks) to hide a small horizontal page overflow
 *   caused by the mobile nav drawer that sits off-screen at negative
 *   inset until it's opened. In practice that clip also breaks
 *   `position: sticky` on descendants in Chrome — the header and the
 *   product gallery stop pinning. The fix belongs on the drawer
 *   itself (clip-path, transform, or display:none until activated)
 *   rather than at the page root. The few pixels of overflow are
 *   harmless on mobile.
 */

/* iOS Safari zooms in when an input's computed font-size < 16px.
   Floor every form control at 16px on touch viewports. */
@media (max-width: 900px) {
	input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
	textarea,
	select {
		font-size: max(1em, 16px);
	}
}

/* Shared bottom-sheet backdrop (created by bottom-sheet.js).
   Mirrors .rh-atc__backdrop so every bottom sheet looks identical. */
.rh-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(15, 17, 21, 0.45);
	opacity: 0;
	transition: opacity 200ms ease-out;
	-webkit-tap-highlight-color: transparent;
}
.rh-sheet-backdrop.is-visible { opacity: 1; }
.rh-sheet-backdrop[hidden] { display: none; }

html.rh-sheet-lock,
html.rh-sheet-lock body {
	overflow: hidden;
	touch-action: none;
}

/* Dialog bottom sheets opened via show() need explicit z-index. */
@media (max-width: 900px) {
	.rh-rev-modal[open],
	.rh-var-modal[open],
	.rh-desc-modal[open],
	.rh-list-modal[open] {
		z-index: 1000;
	}
}

/* Kill focus ring on buttons for touch-primary devices.
   Prevents blue outline flash on hamburger/close after tap. */
@media (pointer: coarse) {
	button:focus-visible,
	[role="button"]:focus-visible {
		outline: none;
	}
}

