/* Floating Order CTA: bottom bar on phones/tablets, floating pill on desktop. Hidden until rew-order-cta.js shows it. */

.rew-octa {
	--rew-octa-bg: var(--mg-primary);
	--rew-octa-bg-hover: var(--mg-primary-hover);
	--rew-octa-text: #FFF;
	--rew-octa-bar: color-mix(in srgb, var(--mg-ink) 96%, transparent);
	--rew-octa-call: #fff;
	--rew-octa-radius: 999px;
	--rew-octa-z: 90;
	position: fixed;
	z-index: var(--rew-octa-z);
	visibility: hidden;
	opacity: 0;
	transition: opacity .3s ease, transform .35s var(--rew-ease-out), visibility 0s .35s;
}

.rew-octa.is-visible {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

.rew-octa--slide:not(.is-visible) { transform: translateY(110%); }
.rew-octa--none { transition: none; }

.rew-octa__inner {
	display: flex;
	gap: 10px;
}

body a.rew-octa__main,
body a.rew-octa__call {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	text-decoration: none;
	font-weight: 700;
}

body a.rew-octa__main {
	flex: 1;
	padding: 6px 24px;
	border: 1.5px solid transparent;
	border-radius: var(--rew-octa-radius);
	background: var(--rew-octa-bg);
	color: var(--rew-octa-text);
	font-size: 16px;
	box-shadow: var(--mg-shadow-md);
	transition: background-color .2s ease, transform .2s var(--rew-ease);
}

body a.rew-octa__main:hover,
body a.rew-octa__main:focus-visible {
	background: var(--rew-octa-bg-hover);
	color: var(--rew-octa-text);
}

.rew-octa__icon {
	width: 24px;
	height: 24px;
	flex: none;
}

.rew-octa__icon .rew-i-s { stroke: currentColor; stroke-width: 3.5; }
.rew-octa__icon .rew-i-f { fill: currentColor; opacity: .18; }

.rew-octa__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.15;
}

.rew-octa__sub {
	font-size: 12px;
	font-weight: 600;
	opacity: .8;
}

body a.rew-octa__call {
	padding: 0 18px;
	border: 1.5px solid rgba(255, 255, 255, .28);
	border-radius: var(--rew-octa-radius);
	color: var(--rew-octa-call);
	font-size: 15px;
}

.rew-octa a:focus-visible {
	outline: 3px solid var(--mg-gold);
	outline-offset: 3px;
}

/* Phones and tablets: full-width bar with safe-area padding. */
@media (max-width: 1024px) {
	.rew-octa--bar {
		inset: auto 0 0;
		padding: 10px 12px max(10px, env(safe-area-inset-bottom));
		background: var(--rew-octa-bar);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		box-shadow: 0 -8px 24px rgba(31, 28, 23, .18);
	}

	.rew-octa--bar a.rew-octa__main {
		box-shadow: none;
	}

	.rew-octa--no-bar {
		display: none;
	}
}

/* Desktop: floating pill, no call button. */
@media (min-width: 1025px) {
	.rew-octa--desktop {
		bottom: 28px;
	}

	.rew-octa--desktop.rew-octa--right { right: 28px; }
	.rew-octa--desktop.rew-octa--left { left: 28px; }

	.rew-octa--desktop a.rew-octa__call { display: none; }

	.rew-octa--desktop a.rew-octa__main:hover { transform: translateY(-2px); }

	.rew-octa--desktop .rew-octa__sub { display: none; }

	.rew-octa--no-desktop { display: none; }
}

/* Reserve room so the phone bar never covers the last content on the page. */
@media (max-width: 1024px) {
	body.rew-has-octa {
		padding-bottom: var(--rew-octa-h, 76px);
	}
}

/* In the Elementor editor the button stays in place so it can be selected and edited. */
.rew-octa--editor {
	position: relative;
	inset: auto;
	visibility: visible;
	opacity: 1;
	transform: none;
	padding: 12px;
	border-radius: 16px;
	background: var(--rew-octa-bar);
}

.rew-octa--editor a.rew-octa__call {
	display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
	.rew-octa,
	body a.rew-octa__main {
		transition: none;
	}

	.rew-octa--slide:not(.is-visible) {
		transform: none;
	}

	.rew-octa--desktop a.rew-octa__main:hover {
		transform: none;
	}
}
