/**
 * YITH Quick View fixes (Biagiotti + RTL).
 *
 * 1) Plugin JS measures empty wrapper as ~23px — force usable size.
 * 2) Theme/RTL close button (left:35px inside a 30px head) hangs half
 *    outside the modal — pin X inside the top-left corner (RTL).
 */

#yith-quick-view-modal .yith-wcqv-wrapper {
	width: min(950px, calc(100vw - 60px)) !important;
	height: min(600px, calc(100vh - 120px)) !important;
	max-height: calc(100vh - 80px) !important;
	overflow: visible !important;
	z-index: 2;
}

#yith-quick-view-modal .yith-wcqv-main {
	height: 100%;
}

#yith-quick-view-modal #yith-quick-view-content {
	min-height: 200px;
	height: auto;
}

#yith-quick-view-modal .yith-quick-view-overlay {
	z-index: 1;
}

/*
 * Close control: .yith-wcqv-main has border-radius:22px + overflow:hidden,
 * so anything nearer than ~28px to the corner gets clipped (looks “half outside”).
 * RTL → keep X top-left, inset past the curve.
 */
#yith-quick-view-modal .yith-wcqv-main {
	/* keep radius; allow close to paint above the curve without being clipped */
	overflow: visible !important;
}

#yith-quick-view-modal #yith-quick-view-content {
	overflow: auto;
	max-height: 100%;
	border-radius: 22px;
}

#yith-quick-view-modal .yith-wcqv-head {
	position: absolute !important;
	top: 28px !important;
	left: 28px !important;
	right: auto !important;
	width: 36px !important;
	height: 36px !important;
	z-index: 1000 !important;
}

#yith-quick-view-modal #yith-quick-view-close,
#yith-quick-view-modal .yith-wcqv-close,
#yith-quick-view-modal .yith-quick-view-close {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	width: 32px !important;
	height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	opacity: 1 !important;
	border: 0 !important;
	box-sizing: border-box !important;
	z-index: 2;
	background: #fff !important;
	border-radius: 50% !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

#yith-quick-view-modal #yith-quick-view-close svg {
	width: 14px !important;
	height: 14px !important;
	display: block;
}
