/**
 * QP Floating Badge — Estilos
 *
 * Badge flotante tipo mini-carrito para la cotización.
 * Position fixed, esquina inferior derecha (o izquierda configurable).
 * Z-index 9999 para no chocar con widgets de Elementor o Bailly.
 */

/* ================================================================
   BADGE FLOTANTE — BASE
   ================================================================ */

.qp-floating-badge {
	position: fixed;
	bottom: 30px;
	z-index: 9999;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Posición derecha (default) */
.qp-floating-badge.qp-badge-right {
	right: 25px;
}

/* Posición izquierda (configurable desde admin) */
.qp-floating-badge.qp-badge-left {
	left: 25px;
}

/* Oculto (sin items) */
.qp-floating-badge.qp-badge-hidden {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.8);
}

/* ================================================================
   ENLACE DEL BADGE
   ================================================================ */

.qp-badge-link {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 58px;
	height: 58px;
	background-color: #1a3a5c;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	color: #ffffff;
	text-decoration: none;
	transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.qp-badge-link:hover {
	background-color: #2a5a8c;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	transform: scale(1.08);
	color: #ffffff;
}

.qp-badge-link:active {
	transform: scale(0.97);
}

/* ================================================================
   ICONO SVG
   ================================================================ */

.qp-badge-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}

.qp-badge-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

/* ================================================================
   CONTADOR
   ================================================================ */

.qp-badge-count {
	position: absolute;
	top: -4px;
	right: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	background-color: #F5A623;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	font-family: inherit;
	line-height: 1;
	border-radius: 12px;
	border: 2px solid #ffffff;
	box-sizing: border-box;
}

/* ================================================================
   ANIMACIÓN AL ACTUALIZAR
   ================================================================ */

@keyframes qp-badge-pulse {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.18); }
	70%  { transform: scale(0.95); }
	100% { transform: scale(1); }
}

.qp-floating-badge.qp-badge-updated .qp-badge-count {
	animation: qp-badge-pulse 0.5s ease;
}

/* ================================================================
   RESPONSIVE — Móvil
   ================================================================ */

@media (max-width: 600px) {
	.qp-floating-badge {
		bottom: 20px;
	}

	.qp-floating-badge.qp-badge-right {
		right: 15px;
	}

	.qp-floating-badge.qp-badge-left {
		left: 15px;
	}

	.qp-badge-link {
		width: 52px;
		height: 52px;
	}

	.qp-badge-icon svg {
		width: 24px;
		height: 24px;
	}
}

/* ================================================================
   ACCESIBILIDAD — Reducir movimiento
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
	.qp-floating-badge,
	.qp-badge-link {
		transition: none;
	}

	.qp-floating-badge.qp-badge-updated .qp-badge-count {
		animation: none;
	}
}
