/* Infotavla — three-column dashboard layout. */

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

html,
body {
	height: 100%;
	margin: 0;
	padding: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #222;
	background: #f4f4f4;
}

h2 {
	font-size: 1.25em;
}

/* Grid: three equal columns sized to the viewport so each can own its
   scrolling region. */
.infotavla {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1rem;
	height: 100vh;
	padding: 1rem;
}

/* "Today" heading at the top of the weather column. */
.box-today h1 {
	margin: 0 0 1rem 0;
}

.column {
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0; /* lets the grid item shrink and scroll instead of growing */
	padding: 1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 0.5rem;

	/* Firefox: keep the scrollbar visible (not auto-hidden) when content
	   overflows the column. */
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.08);
}

/* WebKit (Safari, Chrome, iPad): force a visible scrollbar instead of the
   default auto-hide overlay style. */
.column::-webkit-scrollbar {
	width: 10px;
}

.column::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.08);
	border-radius: 5px;
}

.column::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.4);
	border-radius: 5px;
}

.column::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.6);
}

/* Lists — hide bullets and reset the 40 px indent so rows sit flush left. */
ul {
	list-style: none;
	padding-left: 0;
}

.weather-forecast li,
.bus-stop-departures li {
	margin-bottom: 0.5rem;
}

/* Diet abbreviation legend — small, tight block under each menu. */
.diet-explanations {
	font-size: 75%;
}

.diet-explanations h4 {
	margin-bottom: 0;
}

.diet-explanations-list {
	margin-top: 0;
}

.menu-date-name {
	background: #eee;
	padding: 10px;
	scroll-margin-top: 1rem;
}

.menu-week h3 {
	padding: 10px;
	background: #666;
	color: white;
}

.meal {
	margin-bottom: 0.5rem;
}

/* Flag-day notice — slightly enlarge the flag emoji so it reads at a glance. */
.flag-day [aria-hidden] {
	font-size: 1.5em;
	vertical-align: middle;
}

/* Drop the default top margin from the first heading in these columns so
   their content sits flush against the column's top padding. */
.column-bus-stops h2:first-of-type,
.column-lunch h2:first-of-type {
	margin-top: 0;
}

.name-days strong {
	color: #bbb;
}

.vip-name {
	font-weight: 700;
	color: green;
}

.weather-big-symbols {
	display: flex;
	gap: 0.3em;
	font-size: 4em;
	line-height: 1;
	margin: 0.2em 0 0.4em;
}

.warning-levels {
	display: flow-root;
	margin-bottom: 0.4em;
}

.warning-levels span {
	display: block;
	width: 30px;
	height: 20px;
	border-top: 2px solid white;
	border-bottom: 2px solid white;
	margin: 0;
	float: left;
}

.warning-levels span.warning-level-green {
	background-color: #6af86a; /* grön, Ej fara */
}

.warning-levels span.warning-level-yellow {
	background-color: #f8f800; /* gul, Möjligtvis farlig */
}

.warning-levels span.warning-level-orange {
	background-color: #f9bf2e; /* orange, Farlig */
}

.warning-levels span.warning-level-red {
	background-color: #ff0909; /* röd, Mycket farlig */
}

.warning-levels span.warning-level-active {
	border: 2px solid black;
}

/* Mobile: stack the columns vertically and let the page itself scroll, so
   each column is read top-to-bottom in full instead of needing its own
   scrollbar. */
@media (max-width: 600px) {

	.infotavla {
		grid-template-columns: 1fr;
		height: auto;
	}

	.column {
		overflow: visible;
	}

}

