/*
Theme Name: Tacoma Connect
Theme URI: https://tacomaconnect.local
Author: Tacoma Connect
Author URI: https://tacomaconnect.local
Description: Production-ready WordPress theme for Tacoma Connect — Cultural Architecture for The Collective. Built from the Stitch HTML design system with Tailwind CSS, Space Grotesk & Manrope typography, and custom post types for businesses, creators, and events.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tacoma-connect
Tags: custom-menu, featured-images, full-width-template, blog, custom-post-type, block-theme-ready

Tacoma Connect WordPress theme — see DESIGN.md for the Cultural Architecture design system.
*/

/* Primary theme rules live in assets/css/theme.css and are enqueued via functions.php. */

/*
 * Responsive enhancements — mobile-first fixes for nav, directory, and map.
 * Tailwind handles most breakpoints; these rules cover edge cases, safe areas,
 * and checkbox menu affordances that are easier to express in plain CSS.
 */

/* —— Mobile navigation (checkbox drawer) —— */
#tc-nav-toggle:checked ~ .tc-nav-top-row .tc-nav-burger .tc-nav-burger-icon-open {
	display: none !important;
}

#tc-nav-toggle:checked ~ .tc-nav-top-row .tc-nav-burger .tc-nav-burger-icon-close.hidden {
	display: inline-block !important;
}

.tc-mobile-nav a[class*="border-b-2"] {
	border-bottom-width: 0;
	border-bottom-color: transparent;
}

.tc-mobile-nav a[class*="text-[#00e3fd]"] {
	background-color: rgba(0, 227, 253, 0.08);
	border-radius: 0.5rem;
}

/* Reduce motion when menu open: optional scroll lock on small screens */
@media (max-width: 767px) {
	body:has(#tc-nav-toggle:checked) {
		overflow: hidden;
		touch-action: none;
	}
}

/* —— Directory hub —— */
@media (max-width: 639px) {
	.tc-directory-sticky {
		top: 4rem !important;
	}

	/* Ensure filter chips stay tappable and scroll horizontally without clipping */
	.tc-directory-sticky .no-scrollbar {
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.25rem;
	}
}

/* Directory grid: prevent image + text overflow on very narrow viewports */
@media (max-width: 399px) {
	#tc-main .grid.grid-cols-1 .group .h-80 {
		min-height: 14rem;
		height: auto;
	}
}

/* —— Pulse map —— */
@media (max-width: 767px) {
	.tc-map-main {
		min-height: calc(100dvh - 4.5rem);
	}

	/* Map layer remains full-bleed; sidebar scrolls independently */
	.tc-map-sidebar {
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	/* Ensure floating controls stay above home indicators on notched phones */
	.tc-map-controls {
		z-index: 30;
	}
}

@media (min-width: 768px) {
	.tc-map-main {
		min-height: 0;
	}
}

/* —— Global touch targets & typography tweaks —— */
@media (max-width: 767px) {
	/* Slightly tighter footer stacks (footer uses flex-col md:flex-row in markup) */
	footer.rounded-t-\[2rem\] {
		padding-left: max(1.5rem, env(safe-area-inset-left));
		padding-right: max(1.5rem, env(safe-area-inset-right));
		padding-bottom: max(2rem, env(safe-area-inset-bottom));
	}
}

@media (prefers-reduced-motion: reduce) {
	.tc-mobile-nav,
	.tc-map-sidebar,
	.tc-map-controls button {
		transition: none !important;
	}
}
