/**
 * Atomic Pro - Add to Cart / Buy Now / Quantity / Variations
 */

/* --- Quantity --- */
.atomicpro-atc-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #d1d5db;
	overflow: hidden;
}

.atomicpro-atc-qty-minus,
.atomicpro-atc-qty-plus {
	border: none;
	cursor: pointer;
	width: 36px;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f2f2;
}

.atomicpro-atc-qty-input {
	width: 48px;
	border: none;
	border-left: 1px solid #d1d5db;
	border-right: 1px solid #d1d5db;
	text-align: center;
	-moz-appearance: textfield;
}

.atomicpro-atc-qty-input::-webkit-outer-spin-button,
.atomicpro-atc-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* --- Buttons --- */
.atomicpro-atc-add-btn,
.atomicpro-atc-buy-btn {
	border: none;
	cursor: pointer;
	padding: 10px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	transition: opacity 0.15s;
}

.atomicpro-atc-add-btn:hover,
.atomicpro-atc-buy-btn:hover {
	opacity: 0.9;
}

.atomicpro-atc-add-btn:disabled,
.atomicpro-atc-buy-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.atomicpro-atc-add-btn.is-loading,
.atomicpro-atc-buy-btn.is-loading {
	opacity: 0.7;
	cursor: wait;
}

/* --- Variations --- */
.atomicpro-atc-option {
	margin-bottom: 10px;
}

.atomicpro-atc-option:last-child {
	margin-bottom: 0;
}

/* Resets WooCommerce's own default spacing on this element, which we
   render but otherwise leave empty until a variation is selected. */
.atomicpro-atc-variations-wrap .single_variation_wrap,
.atomicpro-atc-variations-wrap .woocommerce-variation {
	margin: 0;
	padding: 0;
}

.atomicpro-atc-option-label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.atomicpro-atc-option-control select {
	width: 100%;
	padding: 6px 8px;
}

/* Visually hidden but still functional/accessible — used by Variation:
   Buttons to keep the real <select> WooCommerce's JS needs, while
   showing custom buttons instead. Never display:none (would still work
   for JS, but this is the standard accessible hiding technique). */
.atomicpro-atc-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.atomicpro-atc-variation-buttons-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Wrapped in :where() (zero specificity) so a custom class added via
   the widget's own "Button CSS Classes" / "Selected Button CSS Classes"
   fields always overrides these defaults, regardless of which
   stylesheet happens to load last on the page. */
:where(.atomicpro-atc-variation-btn) {
	border: 1px solid #d1d5db;
	background: #ffffff;
	color: #000000;
	padding: 8px 16px;
	cursor: pointer;
	border-radius: 4px;
	font-size: 14px;
}

:where(.atomicpro-atc-variation-btn:hover) {
	border-color: #000000;
	background: #000000;
	color: #ffffff;
}

:where(.atomicpro-atc-variation-btn.is-selected) {
	border-color: #000000;
	background: #000000;
	color: #ffffff;
}

/* --- Status message --- */
.atomicpro-atc-message {
	margin-top: 8px;
	font-size: 13px;
}

.atomicpro-atc-message.is-success {
	color: #15803d;
}

.atomicpro-atc-message.is-error {
	color: #dc2626;
}

.atomicpro-atc-empty {
	opacity: 0.7;
	font-style: italic;
}