/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* Tap target size for buttons on touch screens */
@media (pointer: coarse) {
	.brxe-button {
		min-height: 4.4rem; /* 44px tap target */
	}
}

/* Focus ring offset (ring itself: Theme style > Typography > Focus outline) */
:focus-visible {
	outline-offset: 2px;
}

/* Push footer to the bottom of the screen */
.brx-body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Sticky header box shadow
   Bricks classes on #brx-header: .scrolling = page scrolled, .slide-up = header hidden (scrolling down).
   The shadow is removed while hidden, otherwise its blur shows as a grey band at the top of the screen. */
#brx-header.scrolling {
	box-shadow: var(--shadow-m);
	transition: box-shadow var(--duration-base) var(--ease-standard);
}
#brx-header.scrolling.slide-up {
	box-shadow: none;
}

/* Text link styling: links inside running text and stand-alone text links are always underlined.
   .brxe-post-content = the text of a news post. */
.brxe-text a, .brxe-text-basic a, .brxe-post-content a, .brxe-text-link {
	text-decoration: underline;
	text-decoration-thickness: var(--border-width-s); /* 1px; was -m (2px), too heavy at body size */
	text-underline-offset: 0.2em;
	text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
	transition:
		color var(--duration-base) var(--ease-standard),
		text-decoration-color var(--duration-base) var(--ease-standard);
}

/* Text link hover styling */
.brxe-text a:hover, .brxe-text-basic a:hover, .brxe-post-content a:hover, .brxe-text-link:hover {
	text-decoration-color: currentColor;
}

/* Button styling */
.brxe-button {
	position: relative;
	isolation: isolate;
	white-space: normal;   /* long labels may wrap on small screens */
	text-wrap: balance;
	text-align: center;
	box-shadow: var(--shadow-s);
	transition:
		background-color var(--duration-fast) var(--ease-standard),
		color            var(--duration-fast) var(--ease-standard),
		box-shadow       var(--duration-base) var(--ease-standard),
		transform        var(--duration-fast) var(--ease-standard);
}

/* Hover tint: a layer in the button's own text color, so it works for every style (dark text darkens, light text lightens) */
.brxe-button::after {
	content: "";
	position: absolute;
	inset: calc(var(--border-width-m) * -1); /* cover the 2px button border too, otherwise it shows as a ring on hover */
	z-index: -1;
	border-radius: inherit;
	background-color: currentColor;
	opacity: 0;
	transition: opacity var(--duration-fast) var(--ease-standard);
}
.brxe-button:hover::after {
	opacity: 0.1;
}

/* Button hover styling */
.brxe-button:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-m);
}

/* Outline buttons: flat, no shadow */
.brxe-button.outline,
.brxe-button.outline:hover {
	box-shadow: none;
}

/* Button active styling */
.brxe-button:active {
	transform: translateY(0px);
	box-shadow: var(--shadow-s);
}

/*** Menus ***
   Links come from a WordPress menu (Appearance > Menus) shown by two
   Bricks "Nav Menu" elements in the header template:
   .nav-desktop (header, from 1024px) and .nav-mobile (inside the off-canvas).
   Both elements have "Mobile menu" set to "Always" - in mobile-first mode
   that means Bricks' own mobile menu is never used. */

/* Bricks adds a 30px left margin to every top-level item - spacing comes from the item padding instead */
.nav-desktop .bricks-nav-menu > li,
.nav-mobile .bricks-nav-menu > li {
	margin: 0;
}

/*** Desktop menu ***/

/* Top-level links and dropdown parents. The padded box is the clickable
   element itself, at least 44px tall. */
.nav-desktop .bricks-nav-menu > li > a,
.nav-desktop .bricks-nav-menu > li > .brx-submenu-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;          /* space between text and arrow */
	min-height: 4.4rem;  /* 44px tap target */
	padding: 0.75em 1em;
	text-decoration: none;
}
.nav-desktop .bricks-nav-menu > li > .brx-submenu-toggle > * {
	padding: 0;
}

/* Dropdown parent without its own page (link "#"): the arrow button is
   stretched over the whole padded area, so a click anywhere opens it.
   Parents that link to a page keep the link clickable. */
.nav-desktop .brx-submenu-toggle > button {
	position: static;
	will-change: auto;   /* Bricks sets will-change: transform, which would trap the overlay */
}
.nav-desktop .brx-submenu-toggle:has(> a[href="#"]) > button::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Hover / current-page line: text width, thin, just below the text.
   The parent of the current page gets the line too. */
.nav-desktop .bricks-nav-menu > li > a::after,
.nav-desktop .bricks-nav-menu > li > .brx-submenu-toggle::before {
	content: "";
	position: absolute;
	left: 1em;
	right: 1em;
	bottom: 0.5em;
	height: var(--border-width-m);
	border-radius: var(--radius-full);
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--duration-slow) var(--ease-standard);
}
.nav-desktop .bricks-nav-menu > li > a:hover::after,
.nav-desktop .bricks-nav-menu > li.current-menu-item > a::after,
.nav-desktop .bricks-nav-menu > li > .brx-submenu-toggle:hover::before,
.nav-desktop .bricks-nav-menu > li.current-menu-ancestor > .brx-submenu-toggle::before {
	transform: scaleX(1);
}

/* Dropdown panel */
.nav-desktop .bricks-nav-menu .sub-menu {
	min-width: 20rem;
	padding: var(--space-xs);
	border: var(--border-width-s) solid var(--color-border);
	border-radius: var(--radius-l);
	background-color: var(--color-bg);
	box-shadow: var(--shadow-l);
}

/* Dropdown panel inside a navy (.scheme-primary) header: keep it light,
   with the same role values as .scheme-light */
.scheme-primary .nav-desktop .bricks-nav-menu .sub-menu {
	--color-bg: var(--white);
	--color-text: var(--grey-d-5);
	--color-border: var(--grey-l-4);
	--color-emphasis: var(--primary);
	--color-focus: var(--primary);
	color: var(--color-text);
}
/* Dropdown items */
.nav-desktop .bricks-nav-menu .sub-menu a {
	display: flex;
	align-items: center;
	min-height: 4.4rem;  /* 44px tap target */
	padding: 0.5em 0.75em;
	border-radius: var(--radius-m);
	white-space: nowrap;
	line-height: var(--leading-snug); /* Bricks default is a fixed 60px */
	color: var(--color-text);         /* Bricks default is white */
	text-decoration: none;
	transition: background-color var(--duration-fast) var(--ease-standard);
}
/* Hover: light tint. Current page: different kind of signal (color + weight),
   same as the mobile menu, so the two never look alike. */
.nav-desktop .bricks-nav-menu .sub-menu a:hover {
	background-color: color-mix(in srgb, currentColor 6%, transparent);
}
.nav-desktop .bricks-nav-menu .sub-menu a[aria-current="page"] {
	color: var(--color-emphasis);
	font-weight: var(--weight-medium);
}

/*** Mobile menu (inside the off-canvas) ***/

.nav-mobile .bricks-nav-menu {
	flex-direction: column;
	gap: 0;
}

/* Top-level rows: full width, 48px tall, no divider lines (Blåa Skor) */
.nav-mobile .bricks-nav-menu > li > a,
.nav-mobile .bricks-nav-menu > li > .brx-submenu-toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-s);
	width: 100%;
	min-height: 4.8rem;
	padding: var(--space-s) 0;
	font-size: var(--text-m);
	font-weight: var(--weight-medium);
	text-decoration: none;
}
.nav-mobile .bricks-nav-menu > li > .brx-submenu-toggle > * {
	padding: 0;
	font: inherit;
}

/* Whole row opens the dropdown when the parent has no page of its own */
.nav-mobile .brx-submenu-toggle > button {
	position: static;
	will-change: auto;
}
.nav-mobile .brx-submenu-toggle:has(> a[href="#"]) > button::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Current page */
.nav-mobile .bricks-nav-menu a[aria-current="page"] {
	color: var(--color-emphasis);
}
.nav-mobile .bricks-nav-menu .sub-menu a[aria-current="page"] {
	font-weight: var(--weight-medium);
}

/* Sub-items (dropdown opens in place): indented next to a thin left line (Blåa Skor) */
.nav-mobile .bricks-nav-menu .sub-menu {
	margin: 0 0 var(--space-xs) var(--space-xs);
	padding: 0 0 0 var(--space-m);
	background: none;     /* Bricks default is a dark panel */
	box-shadow: none;
	border-radius: 0;
	border-left: var(--border-width-s) solid var(--color-border);
}
.nav-mobile .bricks-nav-menu .sub-menu a {
	display: flex;
	align-items: center;
	min-height: 4.4rem;
	line-height: var(--leading-snug);
	color: var(--color-text);
	font-size: var(--text-m);
	text-decoration: none;
}

.nav-mobile .bricks-nav-menu .sub-menu a[aria-current="page"] {
	color: var(--color-emphasis);
}

/*** Footer menu (Nav Menu element with class .nav-footer, WP menu "Footer") ***/

.nav-footer .bricks-nav-menu {
	flex-direction: column;
	gap: 0;
}
.nav-footer .bricks-nav-menu > li {
	margin: 0;           /* Bricks default: 30px left margin */
}
.nav-footer .bricks-nav-menu > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 3.2rem;  /* 32px target – tighter list (Blåa Skor; template: 4.4rem), above WCAG 2.2 minimum 24px */
	line-height: var(--leading-snug);
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-thickness: var(--border-width-s); /* 1px; was -m (2px), too heavy at body size */
	text-underline-offset: 0.2em;
	text-decoration-color: color-mix(in srgb, currentColor 60%, transparent); /* visible before hover (Blåa Skor 2026-11-16) */
	transition: text-decoration-color var(--duration-base) var(--ease-standard);
}
.nav-footer .bricks-nav-menu > li > a:hover,
.nav-footer .bricks-nav-menu > li > a[aria-current="page"] {
	text-decoration-color: currentColor;
}

/* Other footer links (bottom bar): underlined like all text links (the template hid the underline until hover; removed for Blåa Skor 2026-11-16). */

/* Maps: Leaflet panes/controls use z-index up to 1000 and would float above the sticky header.
   isolation keeps them inside the map. */
.brxe-map-leaflet,
.brxe-map {
	isolation: isolate;
}

/*** Global ***/

/* Height of the sticky header (about 118px today, logo + padding).
   Used to keep anchor/jump links from landing under the header.
   UPDATE THIS if the header gets taller or shorter (logo size, padding, extra bar). */
:root {
	--header-height: 12rem;
}
html {
	scroll-padding-top: calc(var(--header-height) + var(--space-m));
}

/* Visitors who ask for reduced motion: no smooth scrolling, no transitions, no hover lifts */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto !important;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.brxe-button:hover {
		transform: none;
	}
}

/* Text wrapping. Hyphenation follows the page language (<html lang>, = WordPress Settings > General > Site Language).
   If a site uses another language, set that site language - no CSS change needed. */
h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
	overflow-wrap: break-word;
}
p, li, figcaption, blockquote {
	text-wrap: pretty;
	overflow-wrap: break-word;
	hyphens: auto;
}
@media (max-width: 767.98px) {
	h1, h2, h3 {
		hyphens: auto;   /* long words in big headings on small screens */
	}
}

/* Selected text */
::selection {
	background-color: color-mix(in oklab, var(--primary) 25%, transparent);
	color: inherit;
}

/*** Rich text (Rich text element + post content) ***
   The client editor is limited to bold, italic, links, headings and lists. */
:is(.brxe-text, .brxe-post-content) :is(ul, ol) {
	padding-left: 1.4em;
}
:is(.brxe-text, .brxe-post-content) li + li {
	margin-top: var(--space-xs);
}
:is(.brxe-text, .brxe-post-content) li::marker {
	color: var(--color-emphasis);
}
:is(.brxe-text, .brxe-post-content) :is(strong, b) {
	font-weight: var(--weight-semibold);
}

/*** Pagination (Bricks Pagination element: archive, search) ***/
.bricks-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}
.bricks-pagination li > .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 4.4rem;
	min-height: 4.4rem;  /* 44px tap target */
	padding: 0 1.2rem;
	border: var(--border-width-s) solid var(--color-border);
	border-radius: var(--radius-m);
	color: var(--color-text);
	font-weight: var(--weight-semibold);
	text-decoration: none;
	transition: background-color var(--duration-fast) var(--ease-standard);
}
.bricks-pagination li > a.page-numbers:hover {
	background-color: color-mix(in srgb, currentColor 6%, transparent);
}
.bricks-pagination li > .page-numbers.current {
	border-color: var(--primary);
	background-color: var(--primary);
	color: var(--color-on-primary);
}
.bricks-pagination li > .page-numbers.dots {
	border-color: transparent;
}

/*** Search form (Bricks Search element) ***/
.bricks-search-form {
	display: flex;
	gap: var(--space-xs);
	width: 100%;
	max-width: 48rem;
}
.bricks-search-form input[type=search] {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 4.4rem;
	padding: 1rem 1.2rem;
	border: var(--border-width-s) solid var(--color-border);
	border-radius: var(--radius-m);
	background-color: var(--color-bg);
	color: var(--color-text);
	font: inherit;
	text-align: left;
}
.bricks-search-form input[type=search]::placeholder {
	color: var(--color-text-muted);
	opacity: 1;
}
.bricks-search-form input[type=search]:focus-visible {
	border-color: var(--color-focus);
	outline: var(--border-width-m) solid var(--color-focus);
	outline-offset: 1px;
}
.bricks-search-form button {
	/* Bricks sets width: 60px (sized for an icon) – auto lets the text label fit */
	width: auto;
	flex-shrink: 0;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 4.4rem;
	min-height: 4.4rem;
	padding: 0 2rem;
	font: inherit;
	font-weight: var(--weight-semibold);
	border: 0;
	border-radius: var(--radius-m);
	background-color: var(--primary);
	color: var(--color-on-primary);
	cursor: pointer;
}

/*** Breadcrumbs (Bricks Breadcrumbs element) ***/
.brxe-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs);
	color: var(--color-text-muted);
	font-size: var(--text-s);
}
.brxe-breadcrumbs a.item {
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-thickness: var(--border-width-s);
	text-underline-offset: 0.2em;
	text-decoration-color: transparent;
	transition: text-decoration-color var(--duration-base) var(--ease-standard);
}
.brxe-breadcrumbs a.item:hover {
	text-decoration-color: currentColor;
}

/*** Print ***/
@media print {
	#brx-header,
	#brx-footer,
	.brx-offcanvas,
	.brxe-offcanvas,
	.brxe-map-leaflet,
	.splide__arrows,
	.splide__pagination,
	.brxe-form,
	.brxe-button {
		display: none !important;
	}
	.scheme-dark,
	.scheme-primary,
	.bg-surface {
		--color-bg: #fff;
		--color-surface: #fff;
		--color-text: #000;
		--color-text-muted: #333;
		--color-heading: #000;
		--color-border: #ccc;
		--color-link: #000;
		--color-emphasis: #000;
		background: #fff !important;
	}
	body {
		background: #fff;
		color: #000;
	}
	.brxe-section {
		padding-block: 1.6rem;
	}
	h2, h3 {
		break-after: avoid;
	}
	img {
		break-inside: avoid;
	}
	:is(.brxe-text, .brxe-post-content) a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
	}
}

/* ==========================================================================
   Embeds: CogWork (minaaktiviteter) – [cw shop] / [cw calendar]
   CogWork ships its own CSS. These rules only adapt it to the design system.
   Its CSS sizes some controls in rem; our root font-size is 10px, so they
   shrink (filter buttons came out at 9px text, 26px tall).
   ========================================================================== */

/* Filter buttons */
.cwArea .cwShopFilterLabel.cwShopFilterLabel,
.cwArea .cwShopFilterLabel .cwShopFilterLabelBase {
	font-size: var(--text-s);
}

.cwArea .cwShopFilterLabel.cwShopFilterLabel {
	min-height: 4.4rem;
}

/* Course table: short cells (start date, "8 ggr", price) stay on one line */
.cwArea .cwEvents td.start,
.cwArea .cwEvents td.numberOfOccasions,
.cwArea .cwEvents td.price {
	white-space: nowrap;
}

/* The long "Dag & tid" text may wrap instead – CogWork keeps it on one line,
   which made the table wider than its frame between about 800 and 1250px. */
.cwArea .cwEvents td.time {
	white-space: normal;
}

/* Same on small screens, where the details are one running text. The span has
   no class, only this title (Swedish, from CogWork with lang=sv). */
.cwArea .smallScreenEventSubTitle span[title="Antal tillfällen"] {
	white-space: nowrap;
}

/* Filter popups – the panel, shared by all three types */
.cwArea .cwShopSearchForm {
	position: relative;
}

.cwArea .cwShopFilterList.cwShopFilterList {
	min-width: 26rem;
	max-width: 36rem;
	max-height: min(60vh, 44rem); /* CogWork caps lists at 260px, which cut the last option in half */
	overflow-y: auto;
	margin-top: var(--space-xs);
	padding: var(--space-s);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-l);
	background-color: var(--color-bg);
	box-shadow: var(--shadow-l);
	color: var(--color-text);
	font-size: var(--text-m);
	line-height: var(--leading-snug);
}

/* Below 768px the panel spans the filter bar, so it never leaves the screen */
@media (max-width: 767.98px) {
	.cwArea .cwShopFilterDropdown {
		position: static;
	}

	.cwArea .cwShopFilterList.cwShopFilterList {
		left: 0;
		right: 0;
		width: auto;
		min-width: 0;
		max-width: none;
	}
}

/* Type 1 – pick lists (Ålder, Kategori, Dag, Ledare): checkbox rows */
.cwArea .cwShopFilterList label.cwShopFilterOption {
	display: flex;
	align-items: center;
	gap: var(--space-s);
	min-height: 4.4rem;
	margin: 0;
	padding: 0 var(--space-s);
	border-radius: var(--radius-m);
	color: var(--color-text);
	cursor: pointer;
}

.cwArea .cwShopFilterList label.cwShopFilterOption:hover {
	background-color: var(--color-surface);
}

.cwArea .cwShopFilterList input[type=checkbox] {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	margin: 0;
	accent-color: var(--primary);
}

/* Type 2 – fields (the Sök box and the age box under Ålder) */
.cwArea .cwShopFilterList div.cwShopFilterOption {
	margin: 0;
	padding: var(--space-xs) var(--space-s);
}

.cwArea .cwShopFilterList .cwShopFilterTextSearchInputWrap {
	padding: 0;
}

.cwArea .cwShopFilterList input[type=text],
.cwArea .cwShopFilterList input[type=number] {
	width: 100%;
	min-height: 4.4rem;
	padding-left: 1.2rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-m);
	background-color: var(--color-bg);
	color: var(--color-text);
	font: inherit;
}

.cwArea .cwShopFilterList input[type=text]:focus-visible,
.cwArea .cwShopFilterList input[type=number]:focus-visible {
	border-color: var(--color-focus);
	outline: var(--border-width-m) solid var(--color-focus);
	outline-offset: 1px;
}

/* Type 3 – the "?" help panel (availability legend) */
.cwArea .cwShopFilterList .cwShopAvailabilityHelpHeading {
	margin: 0 0 var(--space-xs);
	padding: var(--space-xs) var(--space-s) 0;
	color: var(--color-heading);
	font-size: var(--text-m);
	font-weight: var(--weight-semibold);
}

.cwArea .cwShopFilterList .cwShopAvailabilityHelpState {
	margin: 0 0 0 var(--space-s);
	padding-top: var(--space-xs);
	padding-bottom: var(--space-xs);
	color: var(--color-text);
	font-size: var(--text-s);
}

/* Schedule ([cw calendar]) – a bare table without CogWork styling. Made to
   match the course list: dotted row lines, bold title, same cell padding. */
.cwCalendar {
	width: 100%;
	border-collapse: collapse;
}

.cwCalendar .cwCalendarEvent {
	border-top: 1px dotted var(--color-border);
}

.cwCalendar .cwCalendarEvent:first-child {
	border-top: 0;
}

.cwCalendar td {
	padding: var(--space-s) 0;
	vertical-align: baseline;
}

/* Day and times: only as wide as their text, never wrapped */
.cwCalendar .cwDateShort,
.cwCalendar .cwStartTime,
.cwCalendar .cwFromToSeparator,
.cwCalendar .cwEndShort {
	width: 1%;
	white-space: nowrap;
}

.cwCalendar .cwDateShort {
	padding-right: var(--space-xl);
}

.cwCalendar .cwStartTime,
.cwCalendar .cwFromToSeparator,
.cwCalendar .cwEndShort {
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
}

.cwCalendar .cwFromToSeparator {
	padding-inline: 0.4rem;
}

.cwCalendar .cwEndShort {
	padding-right: var(--space-xl);
}

.cwCalendar .cwEventTitle {
	color: var(--color-heading);
	font-weight: var(--weight-bold);
}

/* Below 768px: day and time on the first line, the title on its own line */
@media (max-width: 767.98px) {
	.cwCalendar,
	.cwCalendar tbody {
		display: block;
	}

	.cwCalendar .cwCalendarEvent {
		display: grid;
		grid-template-columns: auto auto auto auto 1fr;
		padding-block: var(--space-s);
	}

	.cwCalendar td {
		width: auto;
		padding-block: 0;
	}

	.cwCalendar .cwDateShort {
		padding-right: var(--space-s);
	}

	.cwCalendar .cwEventTitle {
		grid-column: 1 / -1;
	}
}


/* ==========================================================================
   Front page: alternating bands
   The elements from "Innehåll" (page editor) become full-width bands that alternate
   white / light grey - on the front page only (body.home). Automatic: every second
   element is grey; there is no setting for it in the editor, on purpose.
   The class names are element IDs in the Bricks template "Sida (redigerare)":
   .brxe-rjapii = one element row (its section and container are found through it),
   gqvo9o = Text och bild, s9nm95 = Fakta, oq79u9 = Länkkort.
   ========================================================================== */

/* The section's own padding and the gap between rows are replaced by padding inside each band. */
body.home #brx-content > section:has(> .brxe-container > .brxe-rjapii) {
  padding-block: 0;
  overflow-x: clip;
}
body.home #brx-content .brxe-container:has(> .brxe-rjapii) {
  row-gap: 0;
}
body.home #brx-content .brxe-rjapii {
  position: relative;
  isolation: isolate;
  padding-block: var(--section-space-m);
}

/* Every second band: light grey, stretched to the full width of the screen. */
body.home #brx-content .brxe-rjapii:nth-child(even)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-color: var(--color-surface);
}

/* Inside a band the extra margins of the heavy elements are not needed. */
body.home #brx-content .brxe-rjapii > .brxe-gqvo9o,
body.home #brx-content .brxe-rjapii > .brxe-s9nm95,
body.home #brx-content .brxe-rjapii > .brxe-oq79u9 {
  margin-block: 0;
}

/* Fakta: the band itself is the panel. */
body.home #brx-content .brxe-rjapii > .brxe-s9nm95 {
  background: none;
  padding: 0;
}

/* "Bli medlem" continues the alternation: when the last band is grey, the section after it
   (the "Bli medlem" component) turns white instead of its normal light grey. */
body.home #brx-content > section:has(> .brxe-container > .brxe-rjapii:last-child:nth-child(even)) + section {
  background-color: var(--color-bg);
}

/* ==========================================================================
   Viktigt meddelande (alert bar)
   The gold bar above the header. Built in the Bricks Header template (section with the
   class .alert-bar); shown when it is switched on under Blåa Skor -> Viktigt meddelande.
   The close button puts the class .alert-closed on <html> (small script in functions.php).
   ========================================================================== */

.alert-closed .alert-bar {
  display: none;
}

/* The header is sticky. Its sticking point is moved up by the height of the bar (--alert-h,
   measured by the script), so the bar scrolls away with the page and only the menu row sticks. */
#brx-header:has(.alert-bar) {
  top: calc(var(--alert-h, 0px) * -1);
}

/* ==========================================================================
   Forms: field error messages
   Bricks shows these under a field when it is empty or invalid (custom validation is on
   for the contact form). Bricks' default pink is too weak on white (3.6:1), so the
   message uses the system's danger colour (5.8:1) at the small text size.
   Belongs with .form-styled - move it into that class on the Bricks Template site.
   ========================================================================== */

.form-styled .form-group-error-message {
  color: var(--color-danger);
  font-size: var(--text-s);
}

/* ==========================================================================
   Font fallbacks (2026-11-17)
   Stand-ins shown for the split second before Inter / Montserrat arrive.
   They are the visitor's own Arial, resized to take the same room as the
   real font, so lines do not re-wrap and nothing jumps when the font swaps.
   Used through Theme style "Site" > Typography > Body / Headings > fallback
   font ("Inter Fallback", "Montserrat Fallback").
   The numbers were measured against the font files in use; measure again if
   a font is replaced. Preload of the real fonts: functions.php.
   ========================================================================== */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Roboto");
  font-weight: 100 599;
  size-adjust: 105.94%;
  ascent-override: 91.56%;
  descent-override: 22.65%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  font-weight: 600 900;
  size-adjust: 101%;
  ascent-override: 96%;
  descent-override: 23.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Montserrat Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Roboto");
  font-weight: 100 599;
  size-adjust: 113.01%;
  ascent-override: 85.84%;
  descent-override: 22.12%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Montserrat Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  font-weight: 600 900;
  size-adjust: 110%;
  ascent-override: 88%;
  descent-override: 22.7%;
  line-gap-override: 0%;
}

/* ==========================================================================
   Forms: password and remember-me fields (login pages, 2026-11-17)
   - The show/hide password button gets a 44px tap target and a muted colour
     (Bricks: 18x16px, black).
   - "Kom ihåg mig": Bricks prints the label twice (group label + checkbox
     label); the group label is hidden. The field ID must stay lgnrem.
   Belongs in .form-styled on the Bricks Template site.
   ========================================================================== */
.form-styled .password-input-wrapper input {
  padding-right: 4.4rem;
}
.form-styled .password-toggle {
  top: 0;
  right: 0;
  bottom: 0;
  width: 4.4rem;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.form-styled .password-toggle:hover {
  color: var(--color-text);
}
.form-styled .password-toggle .hide {
  display: none;
}
.form-styled .form-group:has(input[name^="form-field-lgnrem"]) > label {
  display: none;
}

/* ==========================================================================
   Schedule card "Närmast på schemat" (2026-11-17)
   Rows are written by the script in functions.php (blaaskor_schedule_script).
   The card is invisible until its rows are in, then fades in (class is-ready
   set by the script). It keeps its place meanwhile - the list reserves room
   for four rows - so the page does not move. Nothing to show = card removed. Each row: day + time on one line, title below
   (one line, cut with … when too long; the full title shows on hover).
   ========================================================================== */
.schedule-list {
  --_row: calc(var(--text-s) * 1.4 + var(--text-m) * 1.3 + var(--space-s) * 2 + 1px);
  width: 100%;
  min-height: calc(var(--_row) * 4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.schedule-row {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-s);
  padding-block: var(--space-s);
  border-top: 1px solid var(--color-border);
}
.schedule-day {
  color: var(--color-emphasis);
  font-size: var(--text-s);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}
.schedule-time {
  color: var(--color-text-muted);
  font-size: var(--text-s);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.schedule-title {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--color-heading);
  font-size: var(--text-m);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
[data-schedule] {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}
[data-schedule].is-ready {
  opacity: 1;
}
[data-schedule][hidden] {
  display: none;
}

/* Phones: two rows, so the hero still fits on one screen. */
@media (max-width: 767.98px) {
  .schedule-list {
    min-height: calc(var(--_row) * 2);
  }
  .schedule-row:nth-child(n+3) {
    display: none;
  }
}

/* "Hela schemat" link: 44px tap target without changing the layout. */
[data-schedule] .brxe-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 4.4rem;
  margin-block: -0.9rem;
}

/* --- The strip: one line under the front-page hero (custom class schedule-strip on the block that has data-schedule).
       Phones: label and link on the first line, the next activity on the second.
       From 1024px: label | activities | link on one line. */
.schedule-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  /* baseline, not center: the label is in the heading font and the rest in the body font, and their
     letters only line up when they share a baseline */
  align-items: baseline;
  column-gap: var(--space-l);
  row-gap: var(--space-xs);
}
.schedule-strip-label {
  color: var(--color-heading);
  font-size: var(--text-s);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.schedule-strip .brxe-text-link {
  /* 44px tap target, but only one text line of layout height, so the strip stays low and its text sits in the middle */
  margin-block: calc((4.4rem - var(--text-s) * 1.4) / -2);
  margin-left: auto;
  font-size: var(--text-s);
  line-height: 1.4;
  white-space: nowrap;
}
.schedule-strip-label {
  line-height: 1.4;
}
.schedule-strip .schedule-list {
  order: 3;
  display: flex;
  flex: 1 0 100%;
  flex-wrap: nowrap;
  align-items: baseline;
  min-width: 0;
  min-height: calc(var(--text-s) * 1.4);
  overflow: hidden;
}
.schedule-strip .schedule-row {
  display: flex;
  flex: 0 1 auto;
  align-items: baseline;
  gap: var(--space-xs);
  min-width: 0;
  padding: 0;
  border: 0;
  white-space: nowrap;
}
.schedule-strip .schedule-row + .schedule-row {
  margin-left: var(--space-l);
  padding-left: var(--space-l);
  border-left: 1px solid var(--color-border);
}
.schedule-strip .schedule-title {
  font-size: var(--text-s);
  line-height: 1.4;
}
.schedule-strip .schedule-row:nth-child(n+2) {
  display: none;
}
@media (min-width: 1024px) {
  .schedule-strip {
    flex-wrap: nowrap;
  }
  .schedule-strip .schedule-list {
    order: 0;
    flex: 1 1 0;
  }
  .schedule-strip .schedule-row:nth-child(2) {
    display: flex;
  }
}
@media (min-width: 1920px) {
  .schedule-strip .schedule-row:nth-child(3) {
    display: flex;
  }
}
/* An empty strip takes its section with it. */
section:has(> .brxe-container > .schedule-strip[hidden]) {
  display: none;
}

/* ==========================================================================
   News card images: any shape, never cropped (2026-11-18)
   Used in the news archive (template 323) and "Senaste nytt" (template 598).
   Block with custom class poster-frame (16:9) holding two Image elements with
   the same featured image:
   - poster-backdrop: small copy, cropped to fill, blurred - fills the space
     the real image does not cover, in the image's own colours (decorative,
     aria-hidden)
   - poster-image: the real image, whole (contain), on top
   A 16:9 image covers the frame completely, so the backdrop never shows.
   ========================================================================== */
.poster-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-surface);
}
.poster-frame > .poster-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.6rem) saturate(1.1);
  transform: scale(1.2);
}
.poster-frame > .poster-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
