/**
 * v3 Location Page Styles
 *
 * Most v3 styles are inlined in includes/v3/render-location-page.php (matches v2 pattern).
 * This file holds only responsive overrides + sticky bar finishing touches that can't
 * cleanly inline.
 *
 * @package StaySTRA_Locations
 * @since 1.7.0
 */

/* Sticky stats bar — initial hidden state set inline; reveal handled by JS */
.staystra-v3-sticky-stats {
	transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.staystra-v3-sticky-stats[style*="display: block"],
.staystra-v3-sticky-stats[style*="display:block"] {
	animation: staystra-v3-slide-down 0.2s ease-out;
}

@keyframes staystra-v3-slide-down {
	from { transform: translateY(-100%); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

/* Mobile: compress hero first-fold + collapse stats grid */
@media (max-width: 640px) {
	.staystra-v3-stats-grid {
		grid-template-columns: 1fr 1fr !important;
		gap: 0.5rem !important;
	}
	.staystra-v3-stat-card--lead {
		grid-column: 1 / -1 !important;
		padding: 1rem !important;
	}
	.staystra-v3-stat-card--lead > div:nth-child(5) {
		font-size: 1.8rem !important;
	}
	.staystra-v3-mini-stats {
		flex-direction: column !important;
		gap: 0.5rem !important;
	}
	.staystra-v3-sticky-stats {
		font-size: 0.75rem;
	}
	.staystra-v3-sticky-stats > div {
		gap: 0.75rem !important;
	}
	.staystra-v3-title {
		font-size: 1.5rem;
	}
	.staystra-v3-headline {
		font-size: 1rem !important;
	}
	.staystra-v3-quick-answer p {
		font-size: 0.9rem !important;
	}
	/* Sticky bar drops below site header on mobile (header is often shorter) */
	.staystra-v3-sticky-stats {
		top: 3.5rem !important;
	}
}

/* Tablet: 2-col instead of 4-col stats grid */
@media (min-width: 641px) and (max-width: 900px) {
	.staystra-v3-stats-grid {
		grid-template-columns: 2fr 1fr 1fr !important;
	}
	.staystra-v3-stats-grid > .staystra-v3-stat-card:nth-child(n+4) {
		grid-column: span 3;
	}
}

/* PM leaderboard: hide reviews column on narrow screens */
@media (max-width: 540px) {
	.staystra-v3-pm-table th:nth-child(4),
	.staystra-v3-pm-table td:nth-child(4) {
		display: none;
	}
}

/* Premium gate CTA — better mobile positioning */
@media (max-width: 640px) {
	.staystra-v3-premium-cta {
		top: 100px !important;
		max-width: 90% !important;
		padding: 1.25rem 1rem !important;
	}
	.staystra-v3-premium-cta h3 {
		font-size: 1.1rem !important;
	}
}

/* Print: clean view for investor PDFs */
@media print {
	.staystra-v3-sticky-stats,
	.staystra-v3-premium-cta {
		display: none !important;
	}
	.staystra-v3-premium-blur {
		filter: none !important;
		pointer-events: auto !important;
	}
	.staystra-v3-chart-wrapper {
		page-break-inside: avoid;
	}
}

/* AEO/screen-reader tables stay accessible to crawlers */
.staystra-v3-aeo-data {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	white-space: nowrap;
	position: absolute !important;
}
