/**
 * GDC Sticky CTA Bar — Mobile-Only Fixed Bottom Bar
 * S7 §14: Appears after Zone 1 scrolls out of view
 *
 * @package GDC
 * @since   5.0.0
 */

/* S7 §14.3: Fixed positioning, full viewport width */
.gdc-sticky-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 56px;
	padding-bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 999;
	background: var(--gdc-bg-deep, #0D1117);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease-out;
	display: none;
}

/* S7 §14.13: Mobile-only — hidden on tablet/desktop */
@media (max-width: 767px) {
	.gdc-sticky-bar {
		display: block;
	}
}

/* S7 §14.4: Visible state */
.gdc-sticky-bar--visible {
	opacity: 1;
	pointer-events: auto;
}

/* S7 §14.8: Hidden when calculator sheet is open */
.gdc-sticky-bar--sheet-open {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease-in;
}

/* S7 §14.2: Content layout */
.gdc-sticky-bar__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
	padding: 0 var(--gdc-space-3, 16px);
	max-width: 100%;
}

/* S7 §14.6: Price display */
.gdc-sticky-bar__price {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	flex-shrink: 1;
}

.gdc-sticky-bar__label {
	font-family: var(--gdc-font-body, 'Manrope', sans-serif);
	font-size: 0.6875rem;
	line-height: 1;
	color: var(--gdc-text-muted, rgba(255, 255, 255, 0.5));
	letter-spacing: 0.02em;
}

.gdc-sticky-bar__amount {
	font-family: var(--gdc-font-body, 'Manrope', sans-serif);
	font-size: 0.9375rem;
	font-weight: var(--gdc-font-bold, 700);
	line-height: 1.3;
	color: var(--gdc-text-primary, #FFFFFF);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* S7 §14.7: CTA button */
.gdc-sticky-bar__cta {
	flex-shrink: 0;
	height: 40px;
	padding: 0 var(--gdc-space-4, 20px);
	border: none;
	border-radius: var(--gdc-radius-md, 8px);
	background: var(--gdc-accent-primary, #9B7FD4);
	color: var(--gdc-text-inverted, #FFFFFF);
	font-family: var(--gdc-font-body, 'Manrope', sans-serif);
	font-size: 0.875rem;
	font-weight: var(--gdc-font-semibold, 600);
	letter-spacing: 0.01em;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: background 0.15s ease;
	min-width: 44px;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gdc-sticky-bar__cta:hover,
.gdc-sticky-bar__cta:focus-visible {
	background: var(--gdc-accent-hover, #8B6FC4);
}

.gdc-sticky-bar__cta:focus-visible {
	outline: 2px solid var(--gdc-accent-primary, #9B7FD4);
	outline-offset: 2px;
}

.gdc-sticky-bar__cta:active {
	background: var(--gdc-accent-active, #7B5FB4);
	transform: scale(0.98);
}

/* S7 §14.14: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.gdc-sticky-bar {
		transition: none;
	}

	.gdc-sticky-bar--sheet-open {
		transition: none;
	}

	.gdc-sticky-bar__cta {
		transition: none;
	}
}
