/**
 * "Reservar" button in the Razzi theme (modo descobrir) styled like the
 * homepage button: full-width underline label + ↗ arrow, brand palette.
 *
 * The button is produced by the Neuza Order Window gate (`.nm-reserve-button`)
 * wherever the Razzi loop add-to-cart would render — shop archive, categories,
 * related products and the Elementor product widgets (masonry/listing/etc).
 *
 * @package Neuza_Order_Window
 */

/* The reserve bar sits among the loop buttons; give it its own full-width row. */
.product-loop__buttons:has(.nm-reserve-button) {
	flex-wrap: wrap;
}

/* Base bar: overrides the theme's round-icon/icon-button loop styles. */
ul.products li.product .wcboost-wishlist-button.nm-reserve-button {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0.65rem 1rem;
	background: transparent;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	box-shadow: none;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	opacity: 1;
	transform: none;
	transition: color 0.3s ease;
	position: relative;
	color: inherit;
}

/* The theme hides the wishlist/loop button label; show it again for the bar. */
ul.products li.product .wcboost-wishlist-button.nm-reserve-button .wcboost-wishlist-button__text,
ul.products li.product .wcboost-wishlist-button.nm-reserve-button .loop_button-text {
	display: inline-block !important;
}

ul.products li.product .wcboost-wishlist-button.nm-reserve-button .nm-reserve-arrow {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	transition: transform 0.3s ease;
}

ul.products li.product .wcboost-wishlist-button.nm-reserve-button:hover {
	background: transparent;
	color: #b9251e;
}

ul.products li.product .wcboost-wishlist-button.nm-reserve-button:hover .nm-reserve-arrow {
	transform: translate(4px, -4px);
}

/* Reserved state: brand red, same as the homepage. */
ul.products li.product .wcboost-wishlist-button.nm-reserve-button.added,
ul.products li.product .wcboost-wishlist-button.nm-reserve-button.is-added {
	color: #b9251e;
}

/* Loading spinner while the wishlist AJAX runs (replaces the theme spinner). */
ul.products li.product .wcboost-wishlist-button.nm-reserve-button.loading .wcboost-wishlist-button__text {
	opacity: 0;
}

ul.products li.product .wcboost-wishlist-button.nm-reserve-button.loading::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: nm-reserve-spin 0.8s linear infinite;
}

@keyframes nm-reserve-spin {
	to {
		transform: rotate(360deg);
	}
}
