/**
 * Landing hero SMS terminal — frosted glass (same material as hero search bar).
 * Blur lives on .demo-terminal-glass so backdrop-filter samples the yellow hero.
 */

#main-banner #canvas {
	z-index: 0;
}

#main-banner .banner-hero-container {
	position: relative;
	z-index: 1;
}

.demo-terminal-shell {
	position: relative;
	width: 820px;
	max-width: 100%;
	border-radius: 20px;
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.22),
		0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Dedicated blur plane — must stay behind content, no overflow:hidden here */
.demo-terminal-glass {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(18, 20, 26, 0.52) 0%,
		rgba(10, 12, 16, 0.48) 100%
	);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	backdrop-filter: blur(20px) saturate(180%);
}

#termynal.demo-terminal,
.demo-terminal {
	--color-bg: transparent;
	--color-text: #eee;

	position: relative;
	z-index: 1;
	width: 100%;
	height: 340px;
	max-width: 100%;
	margin: 0;
	padding: 50px 20px 18px;
	font-size: 15px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: inherit;
	background: transparent !important;
	border: none;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	color: var(--color-text);
	font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;
}

/* Traffic lights */
#termynal.demo-terminal::before,
.demo-terminal::before {
	content: '';
	position: absolute;
	top: 15px;
	left: 15px;
	z-index: 2;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #d9515d;
	box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
}

.demo-terminal-status {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 12.5px;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-terminal-pulse {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #3ec930;
	box-shadow: 0 0 0 0 rgba(62, 201, 48, 0.55);
	animation: demo-terminal-pulse 2.4s ease-in-out infinite;
	flex-shrink: 0;
}

@keyframes demo-terminal-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(62, 201, 48, 0.45); }
	50%      { box-shadow: 0 0 0 6px rgba(62, 201, 48, 0); }
}

.demo-terminal-feed {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	gap: 8px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
	transition: opacity 0.4s ease;
}

.demo-terminal-feed.is-sliding-out .demo-terminal-line {
	animation: demo-terminal-slide-out 0.32s ease forwards;
}

.demo-terminal-line {
	line-height: 1.45;
	word-break: break-word;
}

.demo-terminal-line.is-sliding-in {
	animation: demo-terminal-slide-in 0.32s ease forwards;
}

.demo-terminal-line.is-dim {
	opacity: 0.5;
}

.demo-terminal-line.is-live {
	opacity: 1;
}

.demo-terminal-line.is-live .demo-terminal-body {
	color: #fff;
}

.demo-terminal-from {
	color: #ffcd00;
	font-weight: 600;
}

.demo-terminal-body {
	color: rgba(255, 255, 255, 0.92);
}

.demo-terminal-body .demo-terminal-cursor {
	display: inline-block;
	width: 0.55em;
	margin-left: 1px;
	animation: demo-terminal-blink 1s step-end infinite;
	color: #ffcd00;
}

@keyframes demo-terminal-slide-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes demo-terminal-slide-out {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(-12px);
	}
}

@keyframes demo-terminal-blink {
	50% { opacity: 0; }
}

#main-banner .demo-terminal-shell {
	height: auto;
}

#main-banner .demo-terminal {
	height: 290px;
	padding-top: 46px;
}

/* Hint copy under the terminal */
.demo-terminal-hints {
	margin-top: 1.1rem;
	padding-bottom: 1.75rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.55rem;
	text-align: center;
}

.demo-terminal-hint {
	display: block;
	margin: 0;
	color: #fff;
	font-size: 0.9rem !important;
	line-height: 1.5;
}

.demo-terminal-hint--primary {
	font-weight: 600;
}

.demo-terminal-hint #demo-number {
	font-size: 14px;
}

.demo-terminal-hint a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.demo-terminal-hint a:hover {
	color: #ffcd00;
}

@media (max-width: 768px) {
	#main-banner .demo-terminal {
		height: 260px;
	}

	.demo-terminal-hints {
		padding-bottom: 1.25rem;
	}
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.demo-terminal-glass {
		background: rgba(22, 24, 30, 0.88);
	}
}

@media (prefers-reduced-transparency: reduce) {
	.demo-terminal-glass {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background: rgba(22, 24, 30, 0.92);
	}
}

@media (prefers-reduced-motion: reduce) {
	.demo-terminal-pulse { animation: none; }
	.demo-terminal-line { animation: none; }
	.demo-terminal-body .demo-terminal-cursor { animation: none; }
	.demo-terminal-feed { transition: none; }
	.demo-terminal-line.is-sliding-in,
	.demo-terminal-feed.is-sliding-out .demo-terminal-line {
		animation: none;
	}
}
