/*
 * qrp-cd.css: the storefront cart drawer (qrp-cart-drawer.php 1.0.1).
 * Measurements are Botiga Pro 1.4.1's side mini cart, read off the live
 * site on 5 Oct 2026. The totals and the two buttons are styled by the
 * theme's own .widget_shopping_cart rules (woocommerce.min.css), as they
 * were inside Pro's drawer; this file draws the shell, the slide, the rows,
 * the pinned footer and the empty state. Botiga pins buttons and headings
 * globally, so every property it touches on ours carries !important.
 */

.qrp-cd[hidden] { display: none !important; }

.qrp-cd {
	position: fixed;
	inset: 0;
	z-index: 1000000;
}

.qrp-cd-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(33, 33, 33, .8);
	opacity: 0;
	transition: opacity 300ms ease;
}

.qrp-cd.is-open .qrp-cd-backdrop { opacity: 1; }

.qrp-cd-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	background: var(--bt-color-bg, #fff);
	transform: translate3d(100%, 0, 0);
	transition: transform 300ms ease;
	outline: none;
	box-sizing: border-box;
}

.qrp-cd.is-open .qrp-cd-panel { transform: none; }

@media screen and (min-width: 768px) {
	.qrp-cd-panel { max-width: 560px; }
}

.admin-bar .qrp-cd-panel { top: 32px; }

@media screen and (max-width: 782px) {
	.admin-bar .qrp-cd-panel { top: 46px; }
}

/* the title bar */
.qrp-cd-head {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 40px;
	background: var(--bt-color-content-cards-bg, #f5f5f5);
}

.qrp-cd .qrp-cd-title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 22px !important;
	line-height: 33px !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	color: var(--bt-color-heading-4, #212121);
}

.qrp-cd .qrp-cd-x {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 33px !important;
	height: 33px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 -9px 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--bt-color-heading-4, #212121) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	transform: none !important;
	cursor: pointer;
}

.qrp-cd .qrp-cd-x svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.qrp-cd .qrp-cd-x:focus-visible {
	outline: 2px solid var(--bt-color-heading-4, #212121) !important;
	outline-offset: 2px !important;
}

/* the cart: WooCommerce's mini cart, laid out as a column whose list scrolls */
.qrp-cd .qrp-cd-widget {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	box-shadow: none;
}

.qrp-cd .qrp-cd-widget .widget_shopping_cart_content {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.qrp-cd .qrp-cd-widget .woocommerce-mini-cart__empty-message { display: none; }

.qrp-cd .qrp-cd-widget .product_list_widget {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	margin: 0;
	padding: 40px;
	list-style: none;
	position: static;
	box-shadow: none;
	max-width: 100%;
}

.qrp-cd .qrp-cd-widget .product_list_widget::-webkit-scrollbar { width: 4px; }
.qrp-cd .qrp-cd-widget .product_list_widget::-webkit-scrollbar-track { background: #e2e2e2; }
.qrp-cd .qrp-cd-widget .product_list_widget::-webkit-scrollbar-thumb { background-color: #ccc; }

/* one row: the picture and name, the quantity and price pushed right, any line details beneath the name */
.qrp-cd .qrp-cd-widget .product_list_widget li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	column-gap: 15px;
	row-gap: 6px;
	margin: 0;
	padding: 20px 0;
	min-height: 140px;
	background: transparent;
	box-sizing: border-box;
	transition: opacity 200ms ease;
}

.qrp-cd .qrp-cd-widget .product_list_widget li::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background-color: rgba(33, 33, 33, .1);
}

.qrp-cd .qrp-cd-widget .product_list_widget li:last-of-type::after { display: none; }

.qrp-cd .qrp-cd-widget .product_list_widget li.is-removing { opacity: .4; pointer-events: none; }

.qrp-cd .qrp-cd-widget .product_list_widget li > a:not(.remove) {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: flex-start;
	gap: 15px;
	color: var(--bt-color-heading-4, #212121);
	line-height: 1.4;
	text-decoration: none;
}

.qrp-cd .qrp-cd-widget .product_list_widget li img {
	flex: 0 0 auto;
	width: 81px;
	max-height: 98px;
	height: auto;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

.qrp-cd .qrp-cd-widget .product_list_widget li a.remove {
	position: absolute;
	top: 13px;
	left: -8px;
	z-index: 2;
	width: 18px;
	height: 18px;
	font-size: 16px;
	line-height: 16px;
	text-align: center;
	text-decoration: none;
	border-radius: 50%;
	background-color: var(--bt-color-heading-4, #212121);
	color: var(--bt-color-bg, #fff) !important;
	transition: transform 300ms ease;
}

.qrp-cd .qrp-cd-widget .product_list_widget li a.remove:hover { transform: scale(1.1); }

.qrp-cd .qrp-cd-widget .product_list_widget li > span.quantity {
	margin-left: auto;
	white-space: nowrap;
	font-weight: 600;
	font-size: .875rem;
}

.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation {
	order: 3;
	flex: 0 0 100%;
	margin: 0;
	padding-left: 96px;
	font-size: .875rem;
	box-sizing: border-box;
}

.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation dt,
.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation dd {
	display: inline;
	float: none;
	margin: 0;
}

.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation dt { margin-right: .3em; }

.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation dd p { display: inline; margin: 0; }

.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation dd::after { content: ""; display: block; }

/* the footer: the theme draws the grey card; it stays put while the list
 * scrolls. Everything beside the list keeps its size (the totals, the
 * buttons, and anything a snippet prints between them). */
.qrp-cd .qrp-cd-widget .widget_shopping_cart_content > :not(.product_list_widget) { flex: 0 0 auto; }

/* the empty cart */
.qrp-cd .qrp-cd-empty {
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding: 40px;
	text-align: center;
}

.qrp-cd .qrp-cd-empty-icon svg {
	width: 70px;
	height: auto;
	fill: var(--bt-color-link-default, #212121);
}

.qrp-cd .qrp-cd-empty p { margin: 0 !important; }

.qrp-cd .qrp-cd-empty-title {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--bt-color-heading-4, #212121);
}

.qrp-cd .qrp-cd-empty-cta { margin-top: 15px !important; }

/* while it fetches, and if it cannot */
.qrp-cd .qrp-cd-busy {
	position: absolute;
	left: 0;
	right: 0;
	top: 59px;
	height: 3px;
	overflow: hidden;
	opacity: 0;
	transition: opacity 150ms ease;
	pointer-events: none;
}

.qrp-cd.is-busy .qrp-cd-busy { opacity: 1; }

.qrp-cd .qrp-cd-busy span {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 40%;
	background: var(--bt-color-heading-4, #212121);
}

/* the bar moves only while there is something to wait for */
.qrp-cd.is-busy .qrp-cd-busy span { animation: qrp-cd-busy 1.1s ease-in-out infinite; }

/* a remove waits for the one in flight (the script refuses it); say so */
.qrp-cd.is-busy .qrp-cd-widget .product_list_widget li a.remove { opacity: .5; cursor: progress; }

@keyframes qrp-cd-busy {
	from { left: -40%; }
	to { left: 100%; }
}

.qrp-cd .qrp-cd-error {
	margin: 0 !important;
	padding: 16px 40px;
	font-size: .9375rem;
	color: var(--bt-color-heading-4, #212121);
}

.qrp-cd .qrp-cd-error[hidden] { display: none !important; }

.qrp-cd .qrp-cd-error a { text-decoration: underline; }

@media screen and (max-width: 767px) {
	/* the page behind does not scroll while the drawer is open, on a phone
	 * (as Pro): on a wider screen the lock would take a classic scrollbar
	 * away and shift the whole page sideways behind the backdrop */
	html.qrp-cd-lock { overflow: hidden; }
	.qrp-cd-head { padding: 13px 20px; }
	.qrp-cd .qrp-cd-widget .product_list_widget { padding: 20px; }
	.qrp-cd .qrp-cd-widget .product_list_widget li img { width: 60px; }
	.qrp-cd .qrp-cd-widget .product_list_widget li > dl.variation { padding-left: 75px; }
	.qrp-cd .qrp-cd-empty { padding: 30px 20px; }
	.qrp-cd .qrp-cd-error { padding: 16px 20px; }
}

/* less motion, never a frozen frame (CLAUDE.md section 7): no slide, a slower bar */
@media (prefers-reduced-motion: reduce) {
	.qrp-cd-panel { transition: none; }
	.qrp-cd-backdrop { transition: opacity 150ms linear; }
	.qrp-cd.is-busy .qrp-cd-busy span { animation-duration: 2.4s; }
	.qrp-cd .qrp-cd-widget .product_list_widget li a.remove { transition: none; }
}
