/* Barra inferior tipo app (móvil) + botón flotante WhatsApp (escritorio/tablet). */

:root {
	--cp-wa-green: #25d366;
	--cp-wa-green-dark: #1da851;
	--cp-appbar-h: 62px;
	--cp-appbar-offset: 0px;
}

/* ---------- Botón flotante (> 760px) ---------- */

.cp-wa-float {
	position: fixed;
	right: 24px;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--cp-wa-green);
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform var(--cp-ease, 160ms ease), background var(--cp-ease, 160ms ease);
}

.cp-wa-float:hover,
.cp-wa-float:focus-visible {
	background: var(--cp-wa-green-dark);
	color: #fff;
	transform: translateY(-2px);
}

.cp-wa-float .cp-wa-icon {
	width: 30px;
	height: 30px;
}

.cp-wa-float__tip {
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	padding: 7px 12px;
	border-radius: 6px;
	background: var(--cp-black, #111);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--cp-ease, 160ms ease);
}

.cp-wa-float:hover .cp-wa-float__tip,
.cp-wa-float:focus-visible .cp-wa-float__tip {
	opacity: 1;
}

/* ---------- Barra inferior (<= 760px) ---------- */

.cp-appbar {
	display: none;
}

@media (max-width: 760px) {
	:root {
		--cp-appbar-offset: calc(var(--cp-appbar-h) + env(safe-area-inset-bottom, 0px));
	}

	body {
		padding-bottom: var(--cp-appbar-offset);
	}

	.cp-wa-float {
		display: none;
	}

	.cp-appbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		align-items: stretch;
		height: var(--cp-appbar-offset);
		padding: 0 4px env(safe-area-inset-bottom, 0px);
		background: var(--cp-paper, #fff);
		border-top: 1px solid var(--cp-line, #eaeaea);
		box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
	}

	.cp-appbar__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		min-width: 0;
		height: var(--cp-appbar-h);
		color: var(--cp-muted, #737373);
		font-size: 10.5px;
		font-weight: 600;
		letter-spacing: 0.02em;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}

	.cp-appbar__item.is-active,
	.cp-appbar__item:active {
		color: var(--cp-black, #111);
	}

	.cp-appbar__icon {
		position: relative;
		display: grid;
		place-items: center;
		width: 24px;
		height: 24px;
	}

	.cp-appbar__icon svg {
		width: 22px;
		height: 22px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.8;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.cp-appbar__label {
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.cp-appbar__badge {
		position: absolute;
		top: -6px;
		right: -10px;
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		border-radius: 9px;
		background: var(--cp-black, #111);
		color: #fff;
		font-size: 10px;
		font-weight: 700;
		line-height: 17px;
		text-align: center;
	}

	.cp-appbar__badge[hidden] {
		display: none;
	}

	/* WhatsApp: botón central destacado */
	.cp-appbar__item--wa {
		color: var(--cp-wa-green-dark);
	}

	.cp-appbar__item--wa .cp-appbar__icon {
		width: 46px;
		height: 46px;
		margin-top: -22px;
		border-radius: 50%;
		background: var(--cp-wa-green);
		color: #fff;
		box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
		border: 3px solid var(--cp-paper, #fff);
		box-sizing: content-box;
	}

	.cp-appbar__item--wa .cp-wa-icon {
		width: 26px;
		height: 26px;
	}
}
