/* ============================================================================
   EUX Blocks — eux/tyro-hero-visual (leaf)
   ----------------------------------------------------------------------------
   Photo column with floating Tyro EFTPOS terminal and online-order tag.

   Class prefix: eux-tyv__ (Tyro Visual — short to avoid long selector chains)

   All animation-play-state gating uses the parent section's eux-is-in-view
   class (added by the IntersectionObserver in frontend.js) because eux-reveal
   is on the hero's inner column, which is the element that receives the class.
   ============================================================================ */

.eux-block--tyro-hero-visual {
	display: block;
}

/* ---- Photo wrap — anchor for all absolute children ----------------------- */
.eux-block--tyro-hero-visual .eux-tyv__photo-wrap {
	position: relative; /* REQUIRED: floating terminal + tag are position:absolute */
	aspect-ratio: 4 / 5;
}

/* ---- Photo ---------------------------------------------------------------- */
.eux-block--tyro-hero-visual .eux-tyv__photo {
	width: 100%;
	height: 100%;
	border-radius: 22px;
	overflow: hidden;
	background: var(--eux-cream-50);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 32px 80px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--eux-ink-100);
}

.eux-block--tyro-hero-visual .eux-tyv__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* Placeholder when no photo is uploaded */
.eux-block--tyro-hero-visual .eux-tyv__photo-placeholder {
	width: 100%;
	height: 100%;
	background:
		repeating-linear-gradient(
			-45deg,
			var(--eux-cream-50),
			var(--eux-cream-50) 6px,
			var(--eux-ink-100) 6px,
			var(--eux-ink-100) 7px
		);
}

/* ---- "Live" caption badge ------------------------------------------------ */
.eux-block--tyro-hero-visual .eux-tyv__caption {
	position: absolute;
	left: 18px;
	top: 18px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 7px 12px;
	border-radius: var(--eux-r-pill);
	font-family: var(--eux-font-mono);
	font-size: 10px;
	color: var(--eux-ink-700);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	z-index: 3;
	pointer-events: none;
}

.eux-block--tyro-hero-visual .eux-tyv__caption-pulse {
	width: 7px;
	height: 7px;
	border-radius: var(--eux-r-pill);
	background: var(--eux-success);
	box-shadow: 0 0 0 0 rgba(31, 138, 91, 0.5);
	animation: euTyvHeroBlink 1.6s ease-in-out infinite;
	flex-shrink: 0;
}

@keyframes euTyvHeroBlink {
	50% { box-shadow: 0 0 0 6px rgba(31, 138, 91, 0); }
}

/* ============================================================================
   EFTPOS TERMINAL MOCKUP
   ============================================================================ */

.eux-block--tyro-hero-visual .eux-tyv__term {
	background: var(--eux-ink-900);
	color: var(--eux-cream);
	border-radius: 22px;
	padding: 18px 16px 22px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	position: relative;
	overflow: hidden;
	aspect-ratio: 9 / 14;
	min-height: 0;
}

/* Home-button bar at bottom */
.eux-block--tyro-hero-visual .eux-tyv__term::after {
	content: '';
	position: absolute;
	left: 50%; bottom: 8px;
	transform: translateX(-50%);
	width: 38%; height: 4px;
	background: rgba(255, 255, 255, 0.18);
	border-radius: var(--eux-r-pill);
}

/* Floating variant — overlaps photo, bottom-right */
.eux-block--tyro-hero-visual .eux-tyv__term--float {
	position: absolute;
	right: -60px;
	bottom: 16px;
	width: 36%;
	max-width: 200px;
	aspect-ratio: 9 / 14;
	z-index: 2;
	transform: rotate(-3deg);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 30px 60px rgba(0, 0, 0, 0.22);
}

/* Terminal bar */
.eux-block--tyro-hero-visual .eux-tyv__term-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px;
}

/* Terminal brand text — "ty" in purple, "ro" in cream */
.eux-block--tyro-hero-visual .eux-tyv__term-brand {
	font-family: var(--eux-font-display);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: rgba(244, 240, 236, 0.9);
}

.eux-block--tyro-hero-visual .eux-tyv__term-brand b {
	color: var(--eux-woo-300);
	font-weight: 700;
}

/* Signal indicator */
.eux-block--tyro-hero-visual .eux-tyv__term-sig {
	font-family: var(--eux-font-mono);
	font-size: 9px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(244, 240, 236, 0.55);
	display: inline-flex;
	gap: 4px;
	align-items: center;
}

.eux-block--tyro-hero-visual .eux-tyv__term-sig i {
	width: 5px; height: 5px;
	border-radius: var(--eux-r-pill);
	background: #4ade80;
	animation: euTyvTermBlink 1.4s ease-in-out infinite;
}

@keyframes euTyvTermBlink {
	50% { opacity: 0.35; }
}

/* Screen card */
.eux-block--tyro-hero-visual .eux-tyv__term-screen {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	padding: 16px 14px 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.eux-block--tyro-hero-visual .eux-tyv__term-amt-lbl {
	font-family: var(--eux-font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(244, 240, 236, 0.55);
}

.eux-block--tyro-hero-visual .eux-tyv__term-amt {
	font-family: var(--eux-font-display);
	font-weight: 500;
	font-size: clamp(22px, 3vw, 36px);
	letter-spacing: -0.025em;
	line-height: 1;
	color: var(--eux-cream);
	font-variant-numeric: tabular-nums;
}

.eux-block--tyro-hero-visual .eux-tyv__term-amt small {
	font-size: 0.45em;
	color: rgba(244, 240, 236, 0.5);
	font-weight: 400;
}

.eux-block--tyro-hero-visual .eux-tyv__term-chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.eux-block--tyro-hero-visual .eux-tyv__term-chip {
	font-family: var(--eux-font-mono);
	font-size: 9px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 8px;
	border-radius: var(--eux-r-pill);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(244, 240, 236, 0.78);
	font-weight: 600;
}

/* Tap-to-pay zone */
.eux-block--tyro-hero-visual .eux-tyv__term-tap {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 1px dashed rgba(255, 255, 255, 0.18);
	border-radius: 10px;
	padding: 16px 8px;
	background:
		radial-gradient(circle at 50% 38%, rgba(166, 89, 248, 0.22), transparent 60%),
		rgba(255, 255, 255, 0.02);
}

.eux-block--tyro-hero-visual .eux-tyv__term-tap-ic {
	width: 38px; height: 38px;
	border-radius: var(--eux-r-pill);
	border: 1.5px solid var(--eux-woo-300);
	display: grid;
	place-items: center;
	position: relative;
	animation: euTyvPulse 2.2s ease-out infinite;
}

.eux-block--tyro-hero-visual .eux-tyv__term-tap-ic::before,
.eux-block--tyro-hero-visual .eux-tyv__term-tap-ic::after {
	content: '';
	position: absolute;
	inset: -6px;
	border: 1.5px solid var(--eux-woo-300);
	border-radius: var(--eux-r-pill);
	opacity: 0;
	animation: euTyvRing 2.2s ease-out infinite;
}

.eux-block--tyro-hero-visual .eux-tyv__term-tap-ic::after {
	animation-delay: 1.1s;
}

@keyframes euTyvPulse {
	0%, 100% { transform: scale(1); }
	50%       { transform: scale(1.04); }
}

@keyframes euTyvRing {
	0%   { opacity: 0.7; transform: scale(0.8); }
	100% { opacity: 0;   transform: scale(1.6); }
}

.eux-block--tyro-hero-visual .eux-tyv__term-tap-ic svg {
	color: var(--eux-woo-300);
}

.eux-block--tyro-hero-visual .eux-tyv__term-tap-lbl {
	font-family: var(--eux-font-display);
	font-weight: 500;
	font-size: 13px;
	color: var(--eux-cream);
	text-align: center;
	line-height: 1.3;
}

.eux-block--tyro-hero-visual .eux-tyv__term-tap-sub {
	font-family: var(--eux-font-mono);
	font-size: 9px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(244, 240, 236, 0.5);
}

/* ============================================================================
   ONLINE-ORDER FLOATING TAG
   ============================================================================ */

.eux-block--tyro-hero-visual .eux-tyv__online-tag {
	position: absolute;
	left: -88px;
	top: 28%;
	background: var(--eux-white);
	border: 1px solid var(--eux-ink-100);
	border-radius: 14px;
	padding: 12px 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 18px 40px rgba(0, 0, 0, 0.10);
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 2;
	transform: rotate(2deg);
	min-width: 168px;
	pointer-events: none;
}

.eux-block--tyro-hero-visual .eux-tyv__tag-lbl {
	font-family: var(--eux-font-mono);
	font-size: 9px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--eux-ink-500);
}

.eux-block--tyro-hero-visual .eux-tyv__tag-v {
	font-family: var(--eux-font-display);
	font-weight: 600;
	font-size: 15px;
	color: var(--eux-ink-900);
	letter-spacing: -0.01em;
}

.eux-block--tyro-hero-visual .eux-tyv__tag-v b {
	color: var(--eux-woo-purple);
}

.eux-block--tyro-hero-visual .eux-tyv__tag-meta {
	font-family: var(--eux-font-mono);
	font-size: 9.5px;
	color: var(--eux-ink-500);
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.eux-block--tyro-hero-visual .eux-tyv__tag-meta i {
	width: 6px; height: 6px;
	border-radius: var(--eux-r-pill);
	background: var(--eux-success);
	flex-shrink: 0;
}

/* ============================================================================
   ANIMATION GATING — pause when off-screen
   The pause selector checks eux-is-in-view on the parent hero visual column
   (.eux-tyro-hero__visual-col), which is the element the IntersectionObserver
   fires on via the eux-reveal class on the outer column.
   ============================================================================ */
.eux-tyro-hero__visual-col:not(.eux-is-in-view) .eux-tyv__term-tap-ic,
.eux-tyro-hero__visual-col:not(.eux-is-in-view) .eux-tyv__term-tap-ic::before,
.eux-tyro-hero__visual-col:not(.eux-is-in-view) .eux-tyv__term-tap-ic::after,
.eux-tyro-hero__visual-col:not(.eux-is-in-view) .eux-tyv__term-sig i,
.eux-tyro-hero__visual-col:not(.eux-is-in-view) .eux-tyv__caption-pulse {
	animation-play-state: paused;
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Tight desktop (901-1399) — pull floats in slightly */
@media (min-width: 901px) and (max-width: 1399px) {
	.eux-block--tyro-hero-visual .eux-tyv__term--float {
		right: -36px;
		bottom: 12px;
	}
	.eux-block--tyro-hero-visual .eux-tyv__online-tag {
		left: -56px;
	}
}

/* Tablet (721-900) */
@media (min-width: 721px) and (max-width: 900px) {
	.eux-block--tyro-hero-visual .eux-tyv__term--float {
		right: -24px;
		bottom: 10px;
		width: 40%;
	}
	.eux-block--tyro-hero-visual .eux-tyv__online-tag {
		left: -16px;
		top: 22%;
	}
}

/* Mobile (≤720) — tuck floats inside photo bounds */
@media (max-width: 720px) {
	.eux-block--tyro-hero-visual .eux-tyv__photo-wrap {
		aspect-ratio: 3 / 4;
	}
	.eux-block--tyro-hero-visual .eux-tyv__term--float {
		right: 8px;
		bottom: 8px;
		width: 40%;
	}
	.eux-block--tyro-hero-visual .eux-tyv__online-tag {
		left: 12px;
		top: auto;
		bottom: 30%;
		transform: rotate(-2deg);
	}
}

/* ============================================================================
   EDITOR CANVAS — simplified positions so floats stay visible
   ============================================================================ */
.editor-styles-wrapper .eux-block--tyro-hero-visual .eux-tyv__term--float {
	right: -24px;
}
.editor-styles-wrapper .eux-block--tyro-hero-visual .eux-tyv__online-tag {
	left: 8px;
	top: auto;
	bottom: 28%;
	transform: rotate(-1deg);
}
