/**
 * GDC Mobile Zone Collapse Enhancements
 * S7 §2.3: Mobile-specific collapse behavior, touch feedback, summary styling
 *
 * Scoped to mobile (<768px). Tablet+ resets handled by trip-zones.css.
 * Depends on: trip-zones.css (base collapse system)
 *
 * @package GDC
 * @since   5.0.0
 */

/* ==========================================================
   MOBILE-ONLY COLLAPSE ENHANCEMENTS (< 768px)
   ========================================================== */

@media (max-width: 767px) {

	/* S7 §2.3: Summary border separator between zones */
	.gdc-zone-summary {
		padding: var(--gdc-space-2);
		border-block-end: 1px solid rgba(255, 255, 255, 0.08);
	}

	/* S7 §2.3: Content padding on mobile */
	.gdc-zone-content {
		padding: var(--gdc-space-3) var(--gdc-space-2);
	}

	/* S7 §2.3: Touch feedback — active state on summary tap */
	.gdc-zone-summary:active {
		background-color: rgba(255, 255, 255, 0.04);
	}

	/* S7 §2.3: Preview fade transition */
	.gdc-zone-preview {
		transition: opacity 0.2s ease-in;
	}

	.gdc-zone-details[open] .gdc-zone-preview {
		opacity: 0;
		pointer-events: none;
	}

	/* S7 §2.3: Collapsed content — zero height with transition */
	.gdc-zone-details:not([open]) > .gdc-zone-content {
		max-height: 0;
		overflow: hidden;
		padding-block: 0;
	}

	/* S7 §2.3: Disable collapse for zones within always-expanded threshold */
	.gdc-trip-zone--the-stop .gdc-zone-summary,
	.gdc-trip-zone--the-hook .gdc-zone-summary,
	.gdc-trip-zone--the-host .gdc-zone-summary {
		cursor: default;
		border-block-end: none;
	}

	.gdc-trip-zone--the-stop .gdc-zone-summary:active,
	.gdc-trip-zone--the-hook .gdc-zone-summary:active,
	.gdc-trip-zone--the-host .gdc-zone-summary:active {
		background-color: transparent;
	}

	.gdc-trip-zone--the-stop .gdc-zone-chevron,
	.gdc-trip-zone--the-hook .gdc-zone-chevron,
	.gdc-trip-zone--the-host .gdc-zone-chevron {
		display: none;
	}

	/* S7 §2.3: Feature flag override — all zones expanded when collapse disabled */
	.gdc-collapse-disabled .gdc-zone-details {
		pointer-events: none;
	}

	.gdc-collapse-disabled .gdc-zone-details > .gdc-zone-content {
		max-height: none;
		overflow: visible;
	}

	.gdc-collapse-disabled .gdc-zone-summary {
		cursor: default;
		border-block-end: none;
	}

	.gdc-collapse-disabled .gdc-zone-chevron {
		display: none;
	}

	.gdc-collapse-disabled .gdc-zone-preview {
		display: none;
	}
}

/* ==========================================================
   REDUCED MOTION — disable collapse transitions on mobile
   ========================================================== */

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.gdc-zone-summary {
		transition: none;
	}

	.gdc-zone-preview {
		transition: none;
	}

	.gdc-zone-content {
		transition: none;
	}

	.gdc-zone-content[data-animating] {
		transition: none;
	}
}
