/**
 * Modal Overlay & Product Details Styling for "Who Stocks It"
 */

.wsi-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

/* Force flex display even when jQuery fadeIn overrides display to block */
.wsi-modal[style*="display: block"] {
	display: flex !important;
}



.wsi-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.wsi-modal-content {
	background: #ffffff;
	border-radius: var(--wsi-radius-lg);
	box-shadow: var(--wsi-shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.15);
	border: 1px solid var(--wsi-border-color);
	max-width: 600px;
	width: 100%;
	position: relative;
	z-index: 10;
	overflow: hidden;
	animation: wsi-modal-fade 0.25s ease-out;
}

@keyframes wsi-modal-fade {
	from {
		opacity: 0;
		transform: scale(0.95);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

.wsi-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: #f1f5f9;
	border: none;
	width: 32px;
	height: 32px;
	line-height: 30px;
	font-size: 20px;
	border-radius: 50%;
	color: var(--wsi-text-muted);
	cursor: pointer;
	transition: var(--wsi-transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.wsi-modal-close:hover {
	background: #cbd5e1;
	color: var(--wsi-text-main);
}

/* Modal Body */
.wsi-details-container {
	padding: 30px;
}

.wsi-details-layout {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 24px;
}

@media (max-width: 560px) {
	.wsi-details-layout {
		grid-template-columns: 1fr;
	}

	.wsi-details-img-wrap {
		margin: 0 auto;
	}
}

.wsi-details-img-wrap {
	width: 200px;
	height: 200px;
	background: #f8fafc;
	border-radius: var(--wsi-radius-md);
	border: 1px solid var(--wsi-border-color);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.wsi-details-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: cover;
}

.wsi-details-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wsi-details-info .wsi-details-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	color: var(--wsi-text-main);
	line-height: 1.3;
}

.wsi-details-desc {
	font-size: 14px;
	color: var(--wsi-text-muted);
	line-height: 1.5;
	margin: 0;
	max-height: 120px;
	overflow-y: auto;
}

.wsi-details-price {
	font-size: 22px;
	font-weight: 800;
	color: var(--wsi-text-main);
}

.wsi-details-shop-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wsi-details-link-btn {
	width: fit-content !important;
	text-decoration: none !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	padding: 10px 20px !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	margin-top: 10px;
}

/* Settings Modal Styles */
.wsi-settings-modal-content {
	max-width: 500px;
}

.wsi-settings-modal-body {
	padding: 30px;
	max-height: 85vh;
	overflow-y: auto;
}

.wsi-settings-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 20px 0;
	color: var(--wsi-text-main);
	line-height: 1.3;
	border-bottom: 1px solid var(--wsi-border-color);
	padding-bottom: 12px;
}

#wsi-settings-modal #wsi-filters-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

#wsi-settings-modal .wsi-form-group {
	margin-bottom: 0;
}

#wsi-settings-modal .wsi-refine-section {
	margin-top: 8px;
	padding-top: 16px;
}

#wsi-settings-modal #wsi-apply-filters-btn {
	margin-top: 12px;
	width: 100%;
}

/* Scroll Lock Helper */
html.wsi-no-scroll,
body.wsi-no-scroll {
	overflow: hidden !important;
	height: 100% !important;
}
