/**
 * Mobile sticky loader + model tabs (hero + RoseFlow solution).
 * Flush to viewport top when stuck; minimal glass bar; buttons overlay on scroll.
 */

.rf-mobile-chrome {
	display: none;
}

@media (max-width: 1024px) {
	.rf-hero,
	.rf5 {
		padding-top: 0 !important;
	}

	.rf-hero-chrome.rf-mobile-chrome,
	.rf5-chrome.rf-mobile-chrome {
		display: block;
		position: sticky;
		top: 0;
		z-index: 1001;
		width: 100vw;
		max-width: 100vw;
		margin: 0 calc(50% - 50vw);
		box-sizing: border-box;
		padding: 2px 10px 0;
		background: rgba(8, 0, 17, 0.38);
		backdrop-filter: blur(10px) saturate(1.15);
		-webkit-backdrop-filter: blur(10px) saturate(1.15);
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
		box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
		transition: opacity 0.22s ease, visibility 0.22s ease, background 0.2s ease;
	}

	.rf-mobile-chrome.is-hidden {
		display: none;
	}

	.rf-mobile-chrome.is-scrolled {
		padding-bottom: 6px;
		background: rgba(8, 0, 17, 0.48);
	}

	.rf-mobile-chrome__progress {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: 2px;
		margin: 0;
		padding: 0;
		overflow: hidden;
		background: rgba(255, 255, 255, 0.06);
		border-radius: 0;
	}

	.rf-mobile-chrome__progress > span,
	.rf-mobile-chrome__progress .rf-hero-progress__fill {
		display: block;
		width: 0%;
		height: 100%;
		border-radius: 0;
		background: linear-gradient(90deg, #25d366 0%, #a855f7 55%, var(--rf-gold, #efba60) 100%);
		box-shadow: 0 0 8px rgba(37, 211, 102, 0.28);
		transform-origin: left center;
	}

	.rf5-chrome .rf-mobile-chrome__progress > span {
		background: linear-gradient(90deg, #25d366, #7c3aed, #a855f7);
	}

	.rf-mobile-chrome__progress .rf-hero-progress__fill.is-animating,
	.rf-mobile-chrome__progress > span.is-animating {
		animation: rf-mobile-chrome-progress var(--rf-rotate-ms, 13s) linear forwards;
	}

	.rf5-chrome .rf-mobile-chrome__progress > span.is-animating {
		animation: rf-mobile-chrome-progress 9s linear forwards;
	}

	@keyframes rf-mobile-chrome-progress {
		from {
			width: 0%;
		}

		to {
			width: 100%;
		}
	}

	.rf-mobile-chrome__buttons {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
		width: min(480px, 100%);
		margin: 0 auto;
		padding: 0;
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		pointer-events: none;
		transition:
			max-height 0.38s cubic-bezier(0.2, 0.9, 0.2, 1),
			opacity 0.3s ease,
			padding 0.32s ease;
	}

	.rf-mobile-chrome.is-scrolled .rf-mobile-chrome__buttons {
		max-height: 3.25rem;
		opacity: 1;
		padding-top: 6px;
		padding-bottom: 2px;
		pointer-events: auto;
	}

	.rf-mobile-chrome__btn {
		position: relative;
		overflow: hidden;
		appearance: none;
		min-height: 32px;
		padding: 0 6px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 999px;
		color: rgba(255, 255, 255, 0.78);
		font-family: inherit;
		font-size: 11px;
		font-weight: 700;
		line-height: 1.15;
		text-align: center;
		letter-spacing: -0.01em;
		background: rgba(255, 255, 255, 0.05);
		border: 1px solid rgba(255, 255, 255, 0.08);
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
		cursor: pointer;
		opacity: 0;
		transform: translateY(-6px) scale(0.97);
		transition:
			opacity 0.36s ease,
			transform 0.36s cubic-bezier(0.2, 0.9, 0.2, 1),
			background 0.2s ease,
			border-color 0.2s ease,
			color 0.2s ease;
	}

	.rf-mobile-chrome.is-scrolled .rf-mobile-chrome__btn {
		opacity: 1;
		transform: translateY(0) scale(1);
	}

	.rf-mobile-chrome.is-scrolled .rf-mobile-chrome__btn:nth-child(1) {
		transition-delay: 0.03s;
	}

	.rf-mobile-chrome.is-scrolled .rf-mobile-chrome__btn:nth-child(2) {
		transition-delay: 0.08s;
	}

	.rf-mobile-chrome.is-scrolled .rf-mobile-chrome__btn:nth-child(3) {
		transition-delay: 0.13s;
	}

	.rf-mobile-chrome__btn::before {
		content: "";
		position: absolute;
		inset: 0;
		background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1), transparent 50%);
		opacity: 0;
		transition: opacity 0.2s ease;
		pointer-events: none;
	}

	.rf-mobile-chrome__btn.is-active {
		color: #fff;
		background: rgba(168, 85, 247, 0.16);
		border-color: rgba(168, 85, 247, 0.28);
		box-shadow: 0 0 10px rgba(168, 85, 247, 0.12);
	}

	.rf-mobile-chrome__btn:hover,
	.rf-mobile-chrome__btn:focus-visible {
		color: #fff;
		background: rgba(168, 85, 247, 0.14);
		border-color: rgba(168, 85, 247, 0.22);
	}

	.rf-mobile-chrome__btn:hover::before,
	.rf-mobile-chrome__btn:focus-visible::before {
		opacity: 1;
	}
}

@media (max-width: 380px) {
	.rf-hero-chrome.rf-mobile-chrome,
	.rf5-chrome.rf-mobile-chrome {
		padding-left: 8px;
		padding-right: 8px;
	}

	.rf-mobile-chrome__buttons {
		gap: 5px;
	}

	.rf-mobile-chrome__btn {
		font-size: 10px;
		min-height: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rf-mobile-chrome,
	.rf-mobile-chrome__buttons,
	.rf-mobile-chrome__btn,
	.rf-mobile-chrome__progress > span,
	.rf-mobile-chrome__progress .rf-hero-progress__fill {
		transition: none !important;
		animation: none !important;
	}

	.rf-mobile-chrome.is-scrolled .rf-mobile-chrome__btn {
		opacity: 1;
		transform: none;
	}
}
