/* ------------------------------------------------------------------
   E20loppet – bankarta
   Formspråk hämtat från vägmiljön: skyltgrönt, vägmarkeringsvitt,
   asfaltsgrått. Distanserna sätts som vägskyltar, inte som chips.

   Alla värden är CSS-variabler så att temat kan skriva över dem:
   .e20bk { --e20bk-skylt: #DIN_FARG; }
   ------------------------------------------------------------------ */

.e20bk {
	 --e20bk-skylt:      #ffeb00;   /* Europavägsgrönt – byt till profilfärgen */
	 --e20bk-skylt-ljus: rgba(255, 235, 0, 0.5);
	 --e20bk-asfalt:     #000000;
	 --e20bk-asfalt-mid: #333333;
	 --e20bk-markering:  #FFFFFF;
	 --e20bk-varning:    #F5A623;
	 --e20bk-papper:     #F2F1ED;
	 --e20bk-r:          3px;
	 --e20bk-rl:         30px;
	 --e20bk-hojd:       620px;
   
	 position: relative;
	 height: var(--e20bk-hojd);
	 width: 100%;
	 border-radius: var(--e20bk-r);
	 overflow: hidden;
	 background: var(--e20bk-asfalt);
	 font-family: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	 color: var(--e20bk-asfalt);
	 isolation: isolate;
}

.e20bk *,
.e20bk *::before,
.e20bk *::after { box-sizing: border-box; }

.e20bk__karta { position: absolute; inset: 0; }

/* --- Distansväljaren: tre vägskyltar ------------------------------ */
.e20bk__valjare {
	position: absolute; top: 16px; left: 16px; z-index: 3;
	display: flex; gap: 12px;
}
.e20bk__dist {
	appearance: none;
	border: none;
	background: var(--e20bk-markering);
	color: var(--e20bk-asfalt);
	border-radius: 40px !important;
	cursor: pointer;
	padding: 14px 12px 15px;
	min-width: 66px;
	margin: 0;
	//font-family: "Barlow Condensed", "Barlow", sans-serif;
	text-align: center;
	line-height: 0.9;
	text-transform: none;
	letter-spacing: normal;
	transition: background .15s, border-color .15s;
	box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}
.e20bk__dist .e20bk__tal   { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.e20bk__dist .e20bk__enhet { display: block; font-size: 12px; font-weight: 600; opacity: .75; margin-top: 2px; }
.e20bk__dist:hover { background: var(--e20bk-skylt-ljus); }
.e20bk__dist[aria-pressed="true"] { background: var(--e20bk-skylt); border-color: transparent; }
.e20bk__dist[aria-pressed="true"] .e20bk__enhet { opacity: 1; }
.e20bk__dist:focus-visible { outline: 3px solid var(--e20bk-varning); outline-offset: 2px; }

/* --- Infopanel ---------------------------------------------------- */
.e20bk__panel {
	position: absolute; left: 1.5%; bottom: 16px; z-index: 3;
	//width: 97%;
	width: min(320px, calc(100% - 32px));
	background: var(--e20bk-papper);
	border-radius: 10px;
	box-shadow: 0 6px 24px rgba(0,0,0,.2);
	overflow: hidden;
}
.e20bk__rubrik {
	//font-family: "Barlow Condensed", "Barlow", sans-serif;
	font-size: 22px; font-weight: 700; line-height: 1.15;
	background: var(--e20bk-skylt);
	color: var(--e20bk-asfalt);
	padding: 9px 14px 8px;
	margin: 0;
}
.e20bk__kropp { padding: 12px 14px 14px; }
.e20bk__text  { font-family: "Manrope", sans-serif; font-size: 14.5px; line-height: 1.5; margin: 0; max-width: 62ch; color: var(--e20bk-asfalt); padding-bottom: .5em; }
.e20bk__fakta {
	display: flex; gap: 18px;
	margin-top: 11px; padding-top: 11px;
	border-top: 1px solid #D5D3CC;
}
.e20bk__fakta div  { //font-family: "Barlow Condensed", "Barlow", sans-serif; }
.e20bk__fakta b    { font-family: "Bricolage Grotesque", sans-serif; display: block; font-size: 21px; font-weight: 700; line-height: 1; }
.e20bk__fakta span { font-family: "Manrope", sans-serif; font-size: 12px; font-weight: 400; color: var(--e20bk-asfalt-mid); }

/* --- Uppspelningsknapp -------------------------------------------- */
.e20bk__spela {
	position: absolute; left: 36px; top: 96px; z-index: 3;
	display: inline-flex; align-items: center; gap: 8px;
	border: none; border-radius: var(--e20bk-rl);
	cursor: pointer; margin: 0;
	background: var(--e20bk-skylt);
	color: var(--e20bk-asfalt);
	padding: 11px 16px;
	//	font-family: "Barlow", sans-serif;
	font-size: 14px; font-weight: 600;
	text-transform: none; letter-spacing: normal;
	box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}
.e20bk__spela:hover { background: var(--e20bk-skylt); }
.e20bk__spela:focus-visible { outline: 3px solid var(--e20bk-varning); outline-offset: 2px; }
.e20bk__spela svg { width: 13px; height: 13px; fill: currentColor; }

/* --- Popups ------------------------------------------------------- */
.e20bk .maplibregl-popup-content {
	border-radius: var(--e20bk-r);
	padding: 10px 13px;
	font-family: "Barlow", sans-serif;
	box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.e20bk .maplibregl-popup-content strong {
	display: block;
	font-size: 17px; font-weight: 700; margin-bottom: 2px;
}
.e20bk .maplibregl-popup-content small { font-size: 13px; color: #5B5F5C; line-height: 1.45; }

.e20bk__markor {
	width: 26px; height: 26px; border-radius: 50%;
	border: 2.5px solid #fff;
	box-shadow: 0 2px 7px rgba(0,0,0,.35);
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	color: #fff;
	font-family: "Barlow Condensed", "Barlow", sans-serif;
	font-weight: 700; font-size: 13px;
}

/* --- Status ------------------------------------------------------- */
.e20bk__status {
	position: absolute; inset: 0; z-index: 4;
	display: flex; align-items: center; justify-content: center;
	background: var(--e20bk-asfalt);
	color: var(--e20bk-papper);
	font-size: 15px; text-align: center; padding: 28px; line-height: 1.55;
}
.e20bk__status[hidden] { display: none; }
.e20bk__status code {
	background: rgba(255,255,255,.12);
	padding: 1px 5px; border-radius: 2px;
	font-size: 13px;
}

/* --- Story-läge: 9:16 för sociala medier -------------------------- */
.e20bk--story { border-radius: 0; }
.e20bk--story .e20bk__valjare,
.e20bk--story .e20bk__spela { display: none; }
.e20bk--story .e20bk__panel {
	display: none;
	left: 50%; transform: translateX(-50%);
	bottom: 56px; width: min(86%, 420px);
}
.e20bk--story .e20bk__rubrik  { font-size: 30px; padding: 13px 18px 11px; }
.e20bk--story .e20bk__kropp   { padding: 16px 18px 18px; }
.e20bk--story .e20bk__fakta b { font-size: 27px; }

/* --- Responsivt --------------------------------------------------- */
/* @media (max-width: 640px) {
	.e20bk__valjare { top: 12px; left: 12px; }
	.e20bk__panel   { left: 12px; right: 12px; bottom: 74px; width: auto; }
	.e20bk__spela   { right: 12px; bottom: 12px; left: 12px; top: auto; justify-content: center; }
} */

/* --- Infoknapp: bara mobil ---------------------------------------- */
.e20bk__info { display: none; }

@media (max-width: 640px) {
	.e20bk__valjare { top: 12px; left: 12px; }

	/* Panelen är stängd som standard och tar ingen plats */
	.e20bk__panel {
		display: none;
		left: 12px; right: 12px; bottom: 76px;
		width: auto;
	}
	.e20bk--info-oppen .e20bk__panel { display: block; }

	.e20bk__info {
		position: absolute; left: 12px; bottom: 12px; z-index: 3;
		display: flex; align-items: center; justify-content: center;
		width: 52px; height: 52px;
		padding: 0; margin: 0;
		//border: 2px solid var(--e20bk-markering);
		border-radius: 26px;
		background: var(--e20bk-skylt);
		color: var(--e20bk-asfalt);
		cursor: pointer;
		//font-family: "Barlow Condensed", "Barlow", sans-serif;
		font-size: 15px; font-weight: 700; line-height: 1;
		box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
	}
	.e20bk--info-oppen .e20bk__info { background: var(--e20bk-skylt); }
	.e20bk__info:focus-visible { outline: 3px solid var(--e20bk-varning); outline-offset: 2px; }

	/* Indraget = knappens 52px plus 12px marginal och 8px mellanrum */
	.e20bk__spela {
		left: 84px; right: 12px; bottom: 12px; top: auto;
		height: 52px;
		justify-content: center;
	}
}

/* Story-läget ska inte ha någon av knapparna */
.e20bk--story .e20bk__info { display: none; }

@media (prefers-reduced-motion: reduce) {
	.e20bk * { transition-duration: .01ms !important; }
}







