/* ==========================================================================
   Unicorn Elementor Blocks — Mini Cart popover
   Slide-in cart drawer that appears after add-to-cart and auto-hides.
   All selectors scoped under .ueb-mini-cart.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Outer wrapper — fixed full-height drawer pinned to the right edge.
   Only visible when .is-open is set.
   -------------------------------------------------------------------------- */
.ueb-mini-cart {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	pointer-events: none;
}

.ueb-mini-cart *,
.ueb-mini-cart *::before,
.ueb-mini-cart *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Panel — full viewport height, slides in from the right
   -------------------------------------------------------------------------- */
.ueb-mini-cart__panel {
	display: flex;
	flex-direction: column;
	width: min(454px, 100vw);
	height: 100vh;
	background: #ffffff;
	/* Left-facing corners rounded; the right edge is flush with the viewport. */
	border-radius: 32px 0 0 32px;
	box-shadow:
		-24px 0 48px -12px rgba(58, 18, 77, 0.18),
		-12px 0 24px -8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transform: translateX(100%);
	opacity: 0;
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
	pointer-events: none;
}

.ueb-mini-cart.is-open .ueb-mini-cart__panel {
	transform: translateX(0);
	opacity: 1;
	pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.ueb-mini-cart__head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 27px 32px;
}

.ueb-mini-cart__heading {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: #3a124d;
}

.ueb-mini-cart__heading-icon {
	display: inline-flex;
	width: 26px;
	height: 26px;
}

.ueb-mini-cart__heading-icon svg {
	width: 100%;
	height: 100%;
}

.ueb-mini-cart__heading-text {
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 24px;
	color: #3a124d;
}

.ueb-mini-cart__close {
	position: absolute;
	top: 27px;
	right: 27px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: #f9fafb;
	border: 0;
	border-radius: 9999px;
	color: #1b1c19;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.ueb-mini-cart__close:hover,
.ueb-mini-cart__close:focus-visible {
	background: #ececec;
	color: #1b1c19;
	outline: none;
}

.ueb-mini-cart__close svg {
	width: 15px;
	height: 15px;
}

/* --------------------------------------------------------------------------
   Contents area (items list + footer, or empty state)
   -------------------------------------------------------------------------- */
.ueb-mini-cart__contents {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

/* Items list */
.ueb-mini-cart__items {
	list-style: none;
	margin: 0;
	padding: 8px 32px 16px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.ueb-mini-cart__item {
	display: flex;
	gap: 16px;
	align-items: flex-end;
}

.ueb-mini-cart__thumb-wrap {
	flex: 0 0 78px;
	width: 78px;
	height: 78px;
	background: #f0eee9;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ueb-mini-cart__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ueb-mini-cart__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 0;
	gap: 0;
}

.ueb-mini-cart__name {
	margin: 0;
	font-family: "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 20px;
	color: #1b1c19;
}

.ueb-mini-cart__name a {
	color: inherit;
	text-decoration: none;
}

.ueb-mini-cart__name a:hover {
	color: #3a124d;
}

.ueb-mini-cart__variation {
	font-family: Inter, Helvetica, Arial, sans-serif;
	font-size: 12px;
	line-height: 16px;
	color: #44474c;
}

.ueb-mini-cart__variation p,
.ueb-mini-cart__variation dl,
.ueb-mini-cart__variation dt,
.ueb-mini-cart__variation dd {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
}

.ueb-mini-cart__row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 8px;
}

.ueb-mini-cart__price {
	font-family: Inter, Helvetica, Arial, sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: #1b1c19;
	flex: 1 1 auto;
	min-width: 0;
}

.ueb-mini-cart__price .woocommerce-Price-amount {
	white-space: nowrap;
}

/* Qty stepper pill */
.ueb-mini-cart__qty {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 5px 9px;
	background: #ffffff;
	border: 1px solid rgba(196, 198, 204, 0.3);
	border-radius: 9999px;
	flex: 0 0 auto;
}

.ueb-mini-cart__qty-btn {
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 9999px;
	color: #1b1c19;
	font: 700 16px/1 Inter, sans-serif;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.ueb-mini-cart__qty-btn:hover:not(:disabled),
.ueb-mini-cart__qty-btn:focus-visible:not(:disabled) {
	background: #f4f4ff;
	color: #3a124d;
	outline: none;
}

.ueb-mini-cart__qty-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.ueb-mini-cart__qty-value {
	min-width: 16px;
	text-align: center;
	font-family: Inter, Helvetica, Arial, sans-serif;
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	color: #1b1c19;
	font-variant-numeric: tabular-nums;
}

/* Trash */
.ueb-mini-cart__remove {
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	color: #1b1c19;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease;
	flex: 0 0 auto;
}

.ueb-mini-cart__remove:hover,
.ueb-mini-cart__remove:focus-visible {
	color: #3a124d;
	outline: none;
}

.ueb-mini-cart__remove svg {
	width: 20px;
	height: 20px;
}

/* Loading state (item-level) — fades the row while AJAX is in flight */
.ueb-mini-cart__item.is-busy {
	opacity: 0.5;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Footer (subtotal + CTAs)
   -------------------------------------------------------------------------- */
.ueb-mini-cart__foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 16px 32px 32px;
	border-top: 1px solid rgba(196, 198, 204, 0.25);
	background: #ffffff;
}

.ueb-mini-cart__subtotal {
	font-family: "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 28px;
	color: #1b1c19;
	display: inline-flex;
	gap: 6px;
}

.ueb-mini-cart__subtotal-value .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}

.ueb-mini-cart__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 56px;
	padding: 0 16px;
	border-radius: 32px;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 24px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;
}

.ueb-mini-cart__cta--primary {
	background: #3a124d;
	color: #ffffff;
	font-weight: 700;
	box-shadow:
		0 10px 15px -3px rgba(129, 59, 159, 0.2),
		0 4px 6px -4px rgba(129, 59, 159, 0.2);
	border: 0;
}

.ueb-mini-cart__cta--primary:hover,
.ueb-mini-cart__cta--primary:focus-visible {
	background: #2a0d39;
	color: #ffffff;
	outline: none;
}

.ueb-mini-cart__cta--secondary {
	background: #ffffff;
	color: #3a124d;
	border: 1px solid #3a124d;
}

.ueb-mini-cart__cta--secondary:hover,
.ueb-mini-cart__cta--secondary:focus-visible {
	background: #f4f4ff;
	color: #3a124d;
	outline: none;
}

.ueb-mini-cart__cta-icon {
	display: inline-flex;
	width: 20px;
	height: 20px;
}

.ueb-mini-cart__cta-icon svg {
	width: 100%;
	height: 100%;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.ueb-mini-cart__empty {
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding: 33px;
	flex: 1 1 auto;
}

.ueb-mini-cart__empty-title {
	margin: 0;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 24px;
	color: #1b1c19;
}

.ueb-mini-cart__empty-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: Inter, Helvetica, Arial, sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: #3a124d;
	text-decoration: none;
	align-self: flex-start;
	transition: opacity 0.15s ease;
}

.ueb-mini-cart__empty-link:hover,
.ueb-mini-cart__empty-link:focus-visible {
	color: #3a124d;
	opacity: 0.75;
	outline: none;
}

.ueb-mini-cart__empty-arrow {
	width: 16px;
	height: 16px;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.ueb-mini-cart__panel {
		transition: none;
		transform: none;
	}
	.ueb-mini-cart:not(.is-open) .ueb-mini-cart__panel {
		opacity: 0;
	}
}

/* --------------------------------------------------------------------------
   Small screens — fill the whole viewport
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.ueb-mini-cart__panel {
		width: 100vw;
		border-radius: 0;
	}
}

/* --------------------------------------------------------------------------
   Hide WooCommerce's injected "View cart" link.
   WC's add-to-cart.js appends <a class="added_to_cart wc-forward"> after the
   loop / widget add-to-cart button once an item is added. We funnel the
   shopper through the mini-cart drawer instead (which has its own View Cart
   button), so the inline link is redundant — hide it everywhere on the front
   end. Our own drawer button uses .ueb-mini-cart__* classes, so it is safe.
   -------------------------------------------------------------------------- */
a.added_to_cart.wc-forward {
	display: none !important;
}
