/**
 * WooCommerce WhatsApp Order Button - Frontend Styles
 * Scoped strictly to .nexostdio-waob-wrapper and .nexostdio-waob-button
 */

:root {
	--nexostdio-waob-bg: #25D366;
	--nexostdio-waob-color: #FFFFFF;
	--nexostdio-waob-radius: 4px;
}

/* Container wrapper to ensure clean positioning below WooCommerce Add to Cart */
.nexostdio-waob-wrapper {
	display: block;
	width: 100%;
	clear: both;
	margin-top: 12px;
	margin-bottom: 8px;
	box-sizing: border-box;
}

/* Full Width layout */
.nexostdio-waob-wrapper.nexostdio-waob-width-full .nexostdio-waob-button {
	display: flex;
	width: 100%;
}

/* Auto Width layout */
.nexostdio-waob-wrapper.nexostdio-waob-width-auto .nexostdio-waob-button {
	display: inline-flex;
	width: auto;
}

/* The WhatsApp Order Button */
.nexostdio-waob-button {
	align-items: center;
	justify-content: center;
	background-color: var(--nexostdio-waob-bg, #25D366);
	color: var(--nexostdio-waob-color, #FFFFFF) !important;
	border-radius: var(--nexostdio-waob-radius, 4px);
	padding: 11px 20px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none !important;
	text-align: center;
	box-sizing: border-box;
	border: 1px solid transparent;
	cursor: pointer;
	min-height: 44px;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	gap: 8px;
	-webkit-font-smoothing: antialiased;
}

/* Hover & Active States */
.nexostdio-waob-button:hover {
	filter: brightness(0.92);
	color: var(--nexostdio-waob-color, #FFFFFF) !important;
	text-decoration: none !important;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.nexostdio-waob-button:active {
	filter: brightness(0.85);
	transform: translateY(1px);
}

/* Keyboard accessibility outline */
.nexostdio-waob-button:focus-visible {
	outline: 2px solid var(--nexostdio-waob-bg, #25D366);
	outline-offset: 3px;
}

/* WhatsApp SVG Icon inside button */
.nexostdio-waob-button .nexostdio-waob-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	fill: currentColor;
	vertical-align: middle;
	display: inline-block;
}

/* Button Text */
.nexostdio-waob-button .nexostdio-waob-text {
	display: inline-block;
	vertical-align: middle;
}

/* Disabled state for unselected variable products */
.nexostdio-waob-button.nexostdio-waob-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	filter: grayscale(20%);
}

.nexostdio-waob-button.nexostdio-waob-disabled:hover {
	box-shadow: none;
	filter: grayscale(20%);
	transform: none;
}

/* Validation Notice for missing variations */
.nexostdio-waob-notice {
	display: none;
	margin-top: 6px;
	font-size: 13px;
	color: #d63638;
	line-height: 1.3;
	font-weight: 500;
}

.nexostdio-waob-notice.is-visible {
	display: block;
	animation: nexostdioWaobFadeIn 0.2s ease-in-out;
}

@keyframes nexostdioWaobFadeIn {
	from {
		opacity: 0;
		transform: translateY(-3px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
	.nexostdio-waob-wrapper .nexostdio-waob-button {
		display: flex;
		width: 100%;
		padding: 12px 16px;
		font-size: 14px;
	}
}
