/*
 * Compact Quick Variation Selector Modal.
 * Split out of inc/quick-variation-modal.php: it used to print ~6KB of CSS
 * inline into wp_footer on every page, which no browser or CDN can cache
 * and no minifier can combine. As a file it is fetched once and reused.
 */

/* ─── Compact Quick Variation Modal Styles ─── */
.ds-qv-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}
.ds-qv-modal.is-open {
	opacity: 1;
	visibility: visible;
	display: flex !important;
}
.ds-qv-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.ds-qv-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	background: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 1px 1px rgba(15, 23, 42, 0.08);
	padding: 22px 20px 20px;
	transform: scale(0.92) translateY(10px);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
	border: 1px solid #E2E8F0;
}
.ds-qv-modal.is-open .ds-qv-dialog {
	transform: scale(1) translateY(0);
}

/* Close button */
.ds-qv-close {
	position: absolute;
	top: 14px; right: 14px;
	width: 32px; height: 32px;
	border-radius: 50%;
	background: #F1F5F9;
	border: 0;
	color: #64748B;
	font-size: 20px;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
}
.ds-qv-close:hover {
	background: #FEE2E2;
	color: #DC2626;
	transform: scale(1.08);
}

/* Header */
.ds-qv-header {
	display: flex;
	gap: 14px;
	align-items: center;
	padding-bottom: 16px;
	border-bottom: 1px solid #F1F5F9;
}
.ds-qv-thumb-box {
	width: 68px; height: 68px;
	border-radius: 12px;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	overflow: hidden;
	flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
}
.ds-qv-thumb-box img {
	width: 100%; height: 100%;
	object-fit: cover;
}
.ds-qv-info {
	flex: 1;
	min-width: 0;
	padding-right: 20px;
}
.ds-qv-cat {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	color: #03A8B9;
	letter-spacing: 0.05em;
	display: block;
	margin-bottom: 2px;
}
.ds-qv-title {
	font-size: 14.5px;
	font-weight: 700;
	color: #0F172A;
	margin: 0 0 4px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ds-qv-meta-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.ds-qv-price {
	font-size: 16px;
	font-weight: 800;
	color: #03A8B9;
}
.ds-qv-stock {
	font-size: 11.5px;
	font-weight: 700;
}
.ds-qv-stock.in-stock { color: #10B981; }
.ds-qv-stock.out-of-stock { color: #EF4444; }

/* Body & Options */
.ds-qv-body {
	padding: 16px 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.ds-qv-label-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 8px;
}
.ds-qv-label {
	font-size: 12.5px;
	font-weight: 700;
	color: #334155;
}
.ds-qv-selected-hint {
	font-size: 12px;
	font-weight: 600;
	color: #03A8B9;
}
.ds-qv-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ds-qv-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 36px;
	padding: 0 14px;
	border-radius: 10px;
	background: #F8FAFC;
	border: 1.5px solid #E2E8F0;
	font-size: 12.5px;
	font-weight: 700;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ds-qv-pill:hover {
	border-color: #03A8B9;
	background: #F0FDFA;
	color: #0F172A;
	transform: translateY(-1px);
}
.ds-qv-pill.is-selected {
	background: #03A8B9;
	border-color: #03A8B9;
	color: #FFFFFF;
	box-shadow: 0 4px 12px rgba(3, 168, 185, 0.35);
	transform: scale(1.02);
}
.ds-qv-pill.is-disabled {
	opacity: 0.4;
	pointer-events: none;
	text-decoration: line-through;
	background: #F1F5F9;
	border-color: #CBD5E1;
}

/* Quantity Row */
.ds-qv-qty-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 12px;
	padding: 10px 14px;
}
.ds-qv-qty-ctrl {
	display: flex;
	align-items: center;
	background: #FFFFFF;
	border: 1.5px solid #CBD5E1;
	border-radius: 8px;
	overflow: hidden;
}
.ds-qv-qty-btn {
	width: 32px; height: 32px;
	border: 0;
	background: #F8FAFC;
	color: #0F172A;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s;
}
.ds-qv-qty-btn:hover { background: #E2E8F0; }
.ds-qv-qty-input {
	width: 44px; height: 32px;
	border: 0;
	text-align: center;
	font-size: 13.5px;
	font-weight: 800;
	color: #0F172A;
	-moz-appearance: textfield;
}
.ds-qv-qty-input::-webkit-outer-spin-button,
.ds-qv-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Actions */
.ds-qv-actions {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 10px;
	margin-top: 4px;
}
.ds-qv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	border-radius: 12px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 800;
	cursor: pointer;
	border: 0;
	transition: all 0.2s ease;
}
.ds-qv-order {
	background: linear-gradient(135deg, #03A8B9 0%, #02818E 100%);
	color: #FFFFFF;
	box-shadow: 0 6px 18px rgba(3, 168, 185, 0.35);
}
.ds-qv-order:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(3, 168, 185, 0.45);
}
.ds-qv-cart {
	background: #F1F5F9;
	color: #0F172A;
	border: 1px solid #E2E8F0;
}
.ds-qv-cart:hover {
	background: #E2E8F0;
	transform: translateY(-2px);
}

/* Mobile Bottom Sheet */
@media (max-width: 480px) {
	.ds-qv-modal {
		align-items: flex-end;
		padding: 0;
	}
	.ds-qv-dialog {
		max-width: 100%;
		border-radius: 20px 20px 0 0;
		padding: 20px 18px 28px;
		transform: translateY(100%);
	}
	.ds-qv-modal.is-open .ds-qv-dialog {
		transform: translateY(0);
	}
}
