/**
 * Quick View Modal – matches single product / specifikationer design
 * Trigger: .autohjul-product-card__quick-view, .autohjul-product-card__quick-view-link
 */

.autohjul-quick-view-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}
.autohjul-quick-view-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.autohjul-quick-view-modal {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
	max-width: 900px;
	width: 100%;
	max-height: calc(100vh - 3rem);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.autohjul-quick-view-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	background: #f5f5f5;
	border-bottom: 1px solid #e0e0e0;
	flex-shrink: 0;
}
.autohjul-quick-view-modal__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #111;
}
.autohjul-quick-view-modal__close {
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	color: #333;
	cursor: pointer;
	padding: 0.25rem;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.15s, color 0.15s;
}
.autohjul-quick-view-modal__close:hover {
	background: #e0e0e0;
	color: #000;
}

.autohjul-quick-view-modal__body {
	flex: 1;
	overflow-y: auto;
	min-height: 200px;
}
.autohjul-quick-view-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 3rem 2rem;
}
.autohjul-quick-view-modal__loading .autohjul-tyre-loader {
	width: auto;
}

/* Content grid: image left, details right */
.autohjul-quick-view-content__grid {
	display: flex;
	gap: 2rem;
	padding: 1.5rem 1.5rem 0;
	flex-wrap: wrap;
}
.autohjul-quick-view-content__image {
	flex: 0 0 280px;
	max-width: 100%;
}
.autohjul-quick-view-content__image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}
.autohjul-quick-view-content__details {
	flex: 1;
	min-width: 260px;
}

.autohjul-quick-view-brand {
	margin: 0 0 0.25em;
	font-size: 0.95em;
	color: #333;
}
.autohjul-quick-view-title {
	margin: 0 0 0.35em;
	font-size: 1.35em;
	font-weight: 700;
	color: #111;
	line-height: 1.25;
}
.autohjul-quick-view-specs {
	margin: 0 0 0.35em;
	font-size: 0.9em;
	color: #555;
}
.autohjul-quick-view-content .autohjul-utforsaljning {
	color: #c00;
	font-weight: 600;
	margin: 0 0 0.5em;
}
.autohjul-quick-view-direct {
	margin: 0 0 1rem;
}
.autohjul-quick-view-direct a {
	color: #0066cc;
	text-decoration: underline;
}

/* Meta rows: label left, value right (same as single product) */
.autohjul-quick-view-meta {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 1rem;
}
.autohjul-quick-view-meta-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.autohjul-quick-view-meta-label {
	font-weight: 600;
	color: #333;
	min-width: 140px;
}
.autohjul-quick-view-meta-value {
	color: #333;
}
.autohjul-quick-view-price-row .autohjul-quick-view-meta-value {
	font-weight: 500;
}

/* Stock tooltip (same as single product) – circle with white italic i inside */
.autohjul-quick-view-content .autohjul-single-lager-tooltip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
}
.autohjul-quick-view-content .autohjul-single-lager-tooltip i {
	font-style: italic;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	color: #fff;
}
.autohjul-quick-view-content .autohjul-single-lager-tooltip--green {
	background: #4caf50;
	color: #fff;
}
.autohjul-quick-view-content .autohjul-single-lager-tooltip--orange {
	background: #ff9800;
	color: #fff;
}

/* Quantity + Köp (match single product) */
.autohjul-quick-view-content .autohjul-single-qty-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	flex-wrap: nowrap;
}
.autohjul-quick-view-content .autohjul-single-qty,
.autohjul-quick-view-content .autohjul-single-qty-wrap .autohjul-single-qty {
	width: 2.75em;
	min-width: 2.75em;
	max-width: 3.5em;
	padding: 0.35em 0.4em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9em;
	box-sizing: border-box;
}
.autohjul-quick-view-content .autohjul-single-kop,
.autohjul-quick-view-content .autohjul-quick-view-kop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35em;
	padding: 0.35em 0.75em;
	background: #0066cc;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.85em;
}
.autohjul-quick-view-content .autohjul-single-kop svg,
.autohjul-quick-view-content .autohjul-quick-view-kop svg {
	width: 14px;
	height: 14px;
}

/* Tabs: same as single product – blue underline active */
.autohjul-quick-view-tabs {
	padding: 0 1.5rem 1.5rem;
	border-top: 1px solid #eee;
	margin-top: 0.5rem;
}
.autohjul-quick-view-tabs-nav {
	display: flex;
	gap: 0.5rem;
	border-bottom: 1px solid #e0e0e0;
	margin-bottom: 1rem;
}
.autohjul-quick-view-tab-btn {
	background: none;
	border: none;
	padding: 0.6rem 0.75rem;
	font-size: 0.95em;
	font-weight: 700;
	color: #666;
	cursor: pointer;
	position: relative;
	bottom: -1px;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	transition: color 0.2s, border-color 0.2s;
}
.autohjul-quick-view-tab-btn:hover {
	color: #333;
}
.autohjul-quick-view-tab-btn.is-active {
	color: #1976d2;
	border-bottom-color: #1976d2;
}
.autohjul-quick-view-tab-panel {
	padding: 0.25rem 0;
}
.autohjul-quick-view-tab-panel[hidden] {
	display: none !important;
}

/* Reuse single product tab content styles inside modal */
.autohjul-quick-view-content .autohjul-teknisk-table {
	width: 100%;
	border-collapse: collapse;
}
.autohjul-quick-view-content .autohjul-teknisk-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.65rem 0;
	border-bottom: 1px solid #eee;
	gap: 1.5rem;
	min-height: 2.5em;
}
.autohjul-quick-view-content .autohjul-teknisk-row:nth-child(odd) { background: #fff; }
.autohjul-quick-view-content .autohjul-teknisk-row:nth-child(even) { background: #f8f8f8; }
.autohjul-quick-view-content .autohjul-teknisk-label {
	font-weight: 700;
	color: #111;
	flex: 0 1 40%;
	max-width: 45%;
	font-size: 0.95em;
}
.autohjul-quick-view-content .autohjul-teknisk-value-cell {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #333;
	flex: 1 1 50%;
	min-width: 0;
	text-align: right;
}
.autohjul-quick-view-content .autohjul-teknisk-info-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #555;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
}
.autohjul-quick-view-content .autohjul-teknisk-value { font-weight: 400; color: #333; text-align: left; }
.autohjul-quick-view-content .autohjul-teknisk-brand-img { max-height: 100px; width: auto; max-width: 40%; display: block; object-fit: contain; }
.autohjul-quick-view-content .autohjul-tab-frakt-list { list-style: none; margin: 0.5em 0; padding: 0; }
.autohjul-quick-view-content .autohjul-tab-frakt-list li { margin: 0.35em 0; }
.autohjul-quick-view-content .autohjul-om-modellen-title { color: #0066cc; margin-bottom: 0.5em; }

@media (max-width: 768px) {
	.autohjul-quick-view-content__grid {
		flex-direction: column;
		padding: 1rem 1rem 0;
	}
	.autohjul-quick-view-content__image {
		flex: 0 0 auto;
		max-width: 260px;
		margin: 0 auto;
	}
	.autohjul-quick-view-tabs {
		padding: 0 1rem 1rem;
	}
}
