/**
 * Popup Menu Shortcode – mobile-friendly layout
 * Use with [autohjul_popup_menu] inside your popup/modal.
 */

.autohjul-popup-menu {
	--popup-menu-bg: #fff;
	--popup-menu-text: #1a1a1a;
	--popup-menu-border: #e8e8e8;
	--popup-menu-link: #1a1a1a;
	--popup-menu-link-hover: #2563eb;
	--popup-menu-gap: 0.75rem;
	--popup-menu-padding: 1rem;
	background: var(--popup-menu-bg);
	color: var(--popup-menu-text);
	padding: var(--popup-menu-padding);
	max-height: min(85vh, 600px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Lists reset – no bullets, no extra padding */
.autohjul-popup-menu__list,
.autohjul-popup-menu__list li {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.autohjul-popup-menu__list {
	padding-left: 0 !important;
}

.autohjul-popup-menu__item {
	border-bottom: 1px solid var(--popup-menu-border);
}

.autohjul-popup-menu__item:last-child {
	border-bottom: none;
}

/* Category links: label left, image right – proper menu rows */
.autohjul-popup-menu__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--popup-menu-gap);
	padding: 0.85rem 0;
	text-decoration: none;
	color: var(--popup-menu-text);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.35;
	min-height: 48px;
	transition: color 0.15s ease, background 0.15s ease;
}

.autohjul-popup-menu__link:hover,
.autohjul-popup-menu__link:focus {
	color: var(--popup-menu-link-hover);
	background: rgba(0, 0, 0, 0.02);
}

.autohjul-popup-menu__link--category {
	padding: 0.9rem 0;
}

.autohjul-popup-menu__label {
	flex: 1;
	font-weight: 500;
}

.autohjul-popup-menu__img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	flex-shrink: 0;
}

/* Info section – icon left, label right */
.autohjul-popup-menu__info {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--popup-menu-border);
}

.autohjul-popup-menu__link--info {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 0;
	color: var(--popup-menu-text);
}

.autohjul-popup-menu__link--info:hover,
.autohjul-popup-menu__link--info:focus {
	color: var(--popup-menu-link-hover);
}

.autohjul-popup-menu__info-icon {
	flex-shrink: 0;
}

.autohjul-popup-menu__info-label {
	flex: 1;
	font-weight: 500;
}

/* Kundservice */
.autohjul-popup-menu__kundservice {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--popup-menu-border);
}

.autohjul-popup-menu__kundservice-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--popup-menu-text);
}

.autohjul-popup-menu__contact {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.4rem;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.autohjul-popup-menu__contact:last-child {
	margin-bottom: 0;
}

.autohjul-popup-menu__contact-link {
	color: var(--popup-menu-text);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.autohjul-popup-menu__contact-link:hover {
	color: var(--popup-menu-link);
}

.autohjul-popup-menu__icon {
	flex-shrink: 0;
}

/* Touch-friendly on small screens */
@media (max-width: 480px) {
	.autohjul-popup-menu {
		padding: 1rem 1.25rem;
		max-height: 80vh;
	}

	.autohjul-popup-menu__link {
		min-height: 48px;
		padding: 0.9rem 0;
		-webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
	}

	.autohjul-popup-menu__img {
		width: 48px;
		height: 48px;
	}
}
