/**
 * Header mini-cart dropdown.
 *
 * Styles the shared dropdown shell used by both the Arà Shop cart
 * (`.ara-mini-cart-body`) and the WooCommerce widget (`.widget_shopping_cart_content`),
 * so the header looks the same whichever backend is active.
 * Loaded by `inc/shop-bridge.php` whenever the header cart is shown.
 */

.ara-cart-dropdown .dropdown-menu.ara-mini-cart {
	min-width: 320px;
	max-width: 92vw;
}

/* Arà Shop mini-cart body. */
.ara-mini-cart-items {
	max-height: 50vh;
	overflow-y: auto;
}

.ara-mini-cart-items>li+li {
	border-top: 1px solid var(--ara-border-color, rgba(0, 0, 0, 0.075));
}

.ara-mini-cart-items img {
	width: 48px;
	height: 48px;
	flex: 0 0 auto;
	object-fit: cover;
	border-radius: var(--ara-border-radius);
}

/* Allow the name to truncate inside the flex row. */
.ara-mini-cart-items .flex-grow-1 {
	min-width: 0;
}

.ara-add-to-cart.is-added {
	pointer-events: none;
}

/* Cart page: keep the summary in view while scrolling the items (desktop only). */
@media (min-width: 992px) {
	.ara-cart-summary {
		position: sticky;
		top: 1rem;
	}
}

/* Quote wizard step indicator (Cart -> Your details -> Request sent). */
.ara-steps {
	gap: 0.5rem;
}

.ara-step {
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	align-items: center;
	gap: 0.5rem;
	color: var(--ara-secondary-color, #747474);
	font-size: 0.875rem;
}

.ara-step:not( :last-child)::after {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	margin-left: 0.5rem;
	background: var(--ara-border-color, rgba(0, 0, 0, 0.15));
}

.ara-step__num {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 2px solid var(--ara-border-color, rgba(0, 0, 0, 0.15));
	border-radius: 50%;
	font-weight: 600;
	line-height: 1;
}

.ara-step__label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Completed steps are links back to their page. */
.ara-step__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.ara-step__link:hover .ara-step__label,
.ara-step__link:focus .ara-step__label {
	text-decoration: underline;
}

.ara-step--active {
	color: var(--ara-primary, #0d6efd);
	font-weight: 600;
}

.ara-step--active .ara-step__num {
	border-color: var(--ara-primary, #0d6efd);
	color: var(--ara-primary, #0d6efd);
}

.ara-step--done {
	color: var(--ara-primary, #0d6efd);
}

.ara-step--done .ara-step__num {
	border-color: var(--ara-primary, #0d6efd);
	background: var(--ara-primary, #0d6efd);
	color: #fff;
}

@media (max-width: 575.98px) {
	.ara-step__label {
		display: none;
	}
}

/* Transient error toast (shown by the cart JS when an action fails). */
.ara-cart-toast {
	position: fixed;
	z-index: 1080;
	right: 1rem;
	bottom: 1rem;
	max-width: 22rem;
	margin: 0;
}

/* The WooCommerce widget cart inside this shell is styled in sass/components/_woocommerce.scss. */

.ara-mini-cart-remove {
	color: rgba(var(--ara-body-color-rgb, 36, 36, 36), 0.75);
	transition: color 0.15s ease-in-out, opacity 0.15s ease-in-out;
	position: relative;
	top: -1rem;
	right: -0.5rem;
	left: auto;
}

.ara-mini-cart-remove:hover,
.ara-mini-cart-remove:focus {
	color: rgba(var(--ara-body-color-rgb, 36, 36, 36), 1) !important;
}