/**
 * DataFirefly WhatsApp Commerce — Frontend styles.
 */

/* ===== Floating button ===== */
.dfwc-floating-button {
	position: fixed;
	z-index: 99998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dfwc-pos-bottom-right { right: 20px; bottom: 20px; }
.dfwc-pos-bottom-left  { left: 20px;  bottom: 20px; }
.dfwc-pos-top-right    { right: 20px; top: 20px; }
.dfwc-pos-top-left     { left: 20px;  top: 20px; }

.dfwc-floating-link {
	display: inline-flex;
	align-items: center;
	background: #25D366;
	color: #fff !important;
	text-decoration: none !important;
	padding: 12px 16px;
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
}

.dfwc-floating-link:hover,
.dfwc-floating-link:focus {
	background: #1ebe5d;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
	color: #fff !important;
}

.dfwc-floating-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.dfwc-floating-label {
	margin-left: 10px;
	white-space: nowrap;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-width 0.25s ease, opacity 0.2s ease 0.05s, margin-left 0.25s ease;
}

.dfwc-floating-link:hover .dfwc-floating-label,
.dfwc-floating-link:focus .dfwc-floating-label {
	max-width: 260px;
	opacity: 1;
}

@media (max-width: 600px) {
	.dfwc-floating-label { display: none; }
	.dfwc-floating-link  { padding: 14px; }
}

/* Hide on print. */
@media print { .dfwc-floating-button { display: none !important; } }

/* ===== Inline icon used by CTA buttons ===== */
.dfwc-wa-icon {
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 8px;
	vertical-align: -3px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%2325D366' d='M27.2 4.7C24.3 1.8 20.3.1 16.1.1 7.4.1.3 7.2.3 16c0 2.8.7 5.5 2.1 7.9L0 32l8.4-2.2c2.3 1.3 4.9 1.9 7.6 1.9h0c8.7 0 15.8-7.1 15.8-15.8 0-4.2-1.6-8.2-4.6-11.2zM16.1 29c-2.4 0-4.7-.6-6.7-1.8l-.5-.3-5 1.3 1.3-4.9-.3-.5C3.6 20.7 2.8 18.4 2.8 16c0-7.3 6-13.3 13.3-13.3 3.6 0 6.9 1.4 9.4 3.9 2.5 2.5 3.9 5.8 3.9 9.4 0 7.3-6 13-13.3 13z'/></svg>") no-repeat center / contain;
}

/* ===== Product / cart / checkout CTAs ===== */
.dfwc-product-cta,
.dfwc-cart-cta,
.dfwc-shortcode-button {
	display: inline-flex !important;
	align-items: center;
	background: #25D366 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px;
	padding: 10px 16px !important;
	margin-top: 10px;
	margin-left: 8px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.18s ease;
}

.dfwc-product-cta:hover,
.dfwc-cart-cta:hover,
.dfwc-shortcode-button:hover {
	background: #1ebe5d !important;
	color: #fff !important;
}

.dfwc-product-cta .dfwc-wa-icon,
.dfwc-cart-cta .dfwc-wa-icon,
.dfwc-shortcode-button .dfwc-wa-icon {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23FFFFFF' d='M27.2 4.7C24.3 1.8 20.3.1 16.1.1 7.4.1.3 7.2.3 16c0 2.8.7 5.5 2.1 7.9L0 32l8.4-2.2c2.3 1.3 4.9 1.9 7.6 1.9h0c8.7 0 15.8-7.1 15.8-15.8 0-4.2-1.6-8.2-4.6-11.2zM16.1 29c-2.4 0-4.7-.6-6.7-1.8l-.5-.3-5 1.3 1.3-4.9-.3-.5C3.6 20.7 2.8 18.4 2.8 16c0-7.3 6-13.3 13.3-13.3 3.6 0 6.9 1.4 9.4 3.9 2.5 2.5 3.9 5.8 3.9 9.4 0 7.3-6 13-13.3 13z'/></svg>");
}

/* ===== Checkout help link ===== */
.dfwc-checkout-help {
	margin: 12px 0;
	padding: 10px 12px;
	background: rgba(37, 211, 102, 0.08);
	border-left: 3px solid #25D366;
	border-radius: 4px;
	font-size: 14px;
}

.dfwc-checkout-help a {
	color: #075E54;
	text-decoration: none;
	font-weight: 600;
}

.dfwc-checkout-help a:hover {
	text-decoration: underline;
}
