/*
 * Aoptik sök – utseende för sökknappen, fältet och förslagen.
 * Datorn: knapp + fält ligger i .header_nav_info (rad 1). Mobilen: fältet överst i hamburgerpanelen (#reveal-content).
 */

/* ---------- gemensamt ---------- */
.ao-sok,
.ao-sok * {
	box-sizing: border-box;
	font-family: Enkel, "Open Sans", sans-serif;
}
.header .ao-sok .ao-sok__form {
	position: relative;
	display: flex;
	align-items: center;
	height: 43px;
	margin: 0;
	padding: 0 12px 0 14px;
	border: 1.5px solid #1d1d1d;
	border-radius: 50px;
	background: #fff;
}
.header .ao-sok .ao-sok__lupp {
	display: inline-flex;
	color: #1d1d1d;
	flex: 0 0 auto;
}
.header .ao-sok .ao-sok__falt,
.header .ao-sok .ao-sok__falt:focus {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	height: 100%;
	margin: 0;
	padding: 0 8px 0 10px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	font-size: 15px;
	font-weight: 500;
	color: #1d1d1d;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.header .ao-sok .ao-sok__falt::placeholder {
	color: #8a8a8a;
	font-weight: 400;
}
.header .ao-sok .ao-sok__falt::-webkit-search-cancel-button {
	display: none;
}
.header .ao-sok .ao-sok__stang {
	flex: 0 0 auto;
	margin: 0;
	padding: 4px;
	border: 0;
	background: transparent;
	color: #8a8a8a;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.header .ao-sok .ao-sok__stang:hover {
	color: #1d1d1d;
}

/* förslagen */
.header .ao-sok .ao-sok__panel {
	text-align: left;
	background: #fff;
}
.header .ao-sok .ao-sok__grupp {
	margin: 14px 0 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8a8a8a;
}
.header .ao-sok .ao-sok__grupp:first-child {
	margin-top: 4px;
}
.header .ao-sok .ao-sok__rad {
	max-width: none;
	text-align: left;
	background: transparent;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 6px;
	margin: 0 -6px;
	border-radius: 10px;
	border-bottom: 1px solid #f0f0f0;
	color: #1d1d1d;
	text-decoration: none;
	font-size: 15px;
	line-height: 1.3;
}
.header .ao-sok .ao-sok__rad:hover,
.header .ao-sok .ao-sok__rad:focus {
	background: #f6f6f6;
	color: #1d1d1d;
	outline: none;
}
.header .ao-sok .ao-sok__ik {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #f3f3f3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.header .ao-sok .ao-sok__txt {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.header .ao-sok .ao-sok__t {
	font-weight: 600;
}
.header .ao-sok .ao-sok__u {
	font-size: 13px;
	color: #777;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.header .ao-sok .ao-sok__o {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #777;
	white-space: nowrap;
	overflow: hidden;
}
.header .ao-sok .ao-sok__o:empty {
	display: none;
}
.header .ao-sok .ao-sok__o .ao-idag {
	font-weight: 600;
	color: #1d1d1d;
}
.header .ao-sok .ao-sok__o .ao-idag::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
	vertical-align: 1px;
	background: #9a9a9a;
}
.header .ao-sok .ao-sok__o .ao-idag--oppet::before { background: #2e9b4f; }
.header .ao-sok .ao-sok__o .ao-idag--snart::before,
.header .ao-sok .ao-sok__o .ao-idag--lunch::before { background: #e0a100; }
.header .ao-sok .ao-sok__o .ao-idag--stangt::before { background: #c00d0e; }
.header .ao-sok .ao-sok__o .ao-idag-info:not([hidden])::before {
	content: "·";
	margin-right: 6px;
}
.header .ao-sok .ao-sok__pil {
	margin-left: auto;
	color: #999;
	font-size: 18px;
}
.header .ao-sok .ao-sok__boka {
	margin-left: auto;
	flex: 0 0 auto;
	padding: 7px 14px;
	border-radius: 50px;
	background: #c00d0e;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.header .ao-sok .ao-sok__boka:hover {
	background: #a30b0c;
}
.header .ao-sok mark {
	background: #fdeaea;
	color: inherit;
	border-radius: 3px;
	padding: 0 1px;
}
.header .ao-sok .ao-sok__bagar {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 4px;
}
.header .ao-sok .ao-sok__bag {
	display: block;
	max-width: none;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 8px 12px;
	border: 1px solid #ececec;
	border-radius: 12px;
	text-align: center;
	color: #1d1d1d;
	text-decoration: none;
}
.header .ao-sok .ao-sok__bag:hover,
.header .ao-sok .ao-sok__bag:focus {
	border-color: #1d1d1d;
	color: #1d1d1d;
	outline: none;
}
.header .ao-sok .ao-sok__bag img,
.header .ao-sok .ao-sok__nobild {
	display: block;
	width: 100%;
	height: 64px;
	max-height: none;
	object-fit: contain;
	margin: 0 auto 8px;
}
.header .ao-sok .ao-sok__bm {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}
.header .ao-sok .ao-sok__bc {
	display: block;
	font-size: 12px;
	color: #777;
	margin-top: 2px;
}
.header .ao-sok .ao-sok__alla {
	display: block;
	max-width: none;
	text-align: left;
	background: transparent;
	border-radius: 0;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
	color: #c00d0e;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.header .ao-sok .ao-sok__alla:hover,
.header .ao-sok .ao-sok__alla:focus {
	color: #a30b0c;
	text-decoration: underline;
}
.header .ao-sok .ao-sok__tom {
	margin: 6px 0 10px;
	font-size: 15px;
	color: #4a4a4a;
}

/* ---------- dator: rad 1 i headern ---------- */
.header .ao-sok__knapp {
	order: -2;
	width: 43px;
	height: 43px;
	margin: 0 18px 0 0;
	padding: 0;
	border: 1.5px solid #e2e2e2;
	border-radius: 50%;
	background: #fff;
	color: #1d1d1d;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.header .ao-sok__knapp:hover,
.header .ao-sok__knapp:focus-visible {
	border-color: #1d1d1d;
	outline: none;
}
/* fältet tonar in och lyfter på plats när man klickar på förstoringsglaset (0,4 s), och tonar ut likadant när det stängs */
.header .ao-sok.ao-sok--dator {
	order: -1;
	display: none;
	position: relative;
	height: 43px;
}
.header .ao-sok.ao-sok--dator.is-oppen {
	display: block;
	width: 380px;
	margin-right: 18px;
}
.header .ao-sok.ao-sok--dator .ao-sok__form {
	width: 380px;
}
.header .ao-sok.ao-sok--dator.is-oppen .ao-sok__form {
	animation: ao-sok-in .4s cubic-bezier(.2, .8, .3, 1) both;
}
.header .ao-sok.ao-sok--dator.is-oppen.is-stanger .ao-sok__form {
	animation: ao-sok-ut .4s cubic-bezier(.4, 0, .6, 1) both;
}
@keyframes ao-sok-in {
	from { opacity: 0; transform: scale(.92) translateY(-6px); }
	to { opacity: 1; transform: none; }
}
@keyframes ao-sok-ut {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: scale(.92) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
	.header .ao-sok.ao-sok--dator .ao-sok__form {
		animation: none !important;
	}
}
html.ao-sok-oppen .header .header_nav_info > .ao-sok__knapp,
html.ao-sok-oppen .header .header_nav_info > a:nth-child(1),
html.ao-sok-oppen .header .header_nav_info > a:nth-child(2) {
	display: none;
}
.header .ao-sok.ao-sok__panel--dator {
	background: #fff;
	text-align: left;
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 560px;
	animation: ao-sok-panel .18s ease;
	max-height: calc(100vh - 140px);
	overflow: auto;
	padding: 14px 20px 10px;
	border: 1px solid #e6e6e6;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
	z-index: 1000;
}
.header .ao-sok.ao-sok__panel--dator .ao-sok__rad:last-child {
	border-bottom: 0;
}
@keyframes ao-sok-panel {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}

/* ---------- mobil: överst i hamburgerpanelen ---------- */
.header .ao-sok.ao-sok--mobil {
	margin: 40px 10px 12px; /* under krysset uppe till höger, 10 px in från panelens kanter (Rickard 2026-11-05) */
}
.header .ao-sok.ao-sok--mobil .ao-sok__form {
	width: 100%;
}
.header .ao-sok.ao-sok--mobil .ao-sok__stang {
	display: none;
}
.header .ao-sok.ao-sok--mobil.is-aktiv .ao-sok__stang {
	display: inline-block;
}
.header .ao-sok.ao-sok--mobil .ao-sok__panel {
	padding: 4px 0 12px;
}
/* medan man skriver: förslagen ersätter menyn och knapparna, och panelen börjar uppifrån i stället för att centreras */
#reveal-content.ao-sok-aktiv {
	justify-content: flex-start;
	overflow-y: auto; /* långa förslagslistor ska gå att skrolla */
}
@media screen and (min-width: 641px) {
	/* panelen på dator/surfplatta har redan stor luft upptill (temats 6vw) – fältet läggs direkt där, under krysset */
	.header .ao-sok.ao-sok--mobil {
		margin-top: 0;
	}
}
#reveal-content.ao-sok-aktiv > :not(.ao-sok) {
	display: none;
}
/* iOS zoomar in på fält med text under 16 px – därför 16 px på mobil och surfplatta */
@media screen and (max-width: 1023px) {
	.header .ao-sok .ao-sok__falt,
	.header .ao-sok .ao-sok__falt:focus {
		font-size: 16px;
	}
}
/* i hamburgerpanelen (smal) får öppettidsraden radbrytas i stället för att klippas */
.header .ao-sok.ao-sok--mobil .ao-sok__o {
	display: block;
	white-space: normal;
	overflow: visible;
	line-height: 1.4;
}
/* status och "Öppnar …" på var sin rad, så inte klockslaget hamnar ensamt på en ny rad */
.header .ao-sok.ao-sok--mobil .ao-sok__o .ao-idag,
.header .ao-sok.ao-sok--mobil .ao-sok__o .ao-idag-info {
	display: block;
	white-space: nowrap;
}
.header .ao-sok.ao-sok--mobil .ao-sok__o .ao-idag-info:not([hidden])::before {
	content: none;
}
.header .ao-sok.ao-sok--mobil .ao-sok__o .ao-idag-info {
	padding-left: 14px; /* i linje med texten efter pricken */
}
@media screen and (max-width: 640px) {
	.header .ao-sok .ao-sok__bag img,
	.header .ao-sok .ao-sok__nobild {
		height: 52px;
	}
	.header .ao-sok .ao-sok__bm {
		font-size: 12px;
	}
}
