/* Theme style */

/* ==========================================================================
Base styles
========================================================================== */

/* Focus
========================================================================== */

/* The parent draws every focus ring (WCAG 2.4.7) from custom.color.focus and
   focus-contrast, set to primary and light in theme.json. On dark backgrounds
   a primary ring would vanish, so there it is an accent outline with a
   primary inner ring. Changing the tokens (not the outline) also reaches the
   parent's slider, menu and WooCommerce rings. The tokens are set on the
   children of each coloured box and inherited, so the nearest box decides:
   a light card in a dark band, or a dark band inside that card, both work. */
:is(.has-dark-background-color, .has-primary-background-color, .has-neutral-dark-background-color, .wp-block-cover:not(.is-light)) > * {
    --wp--custom--color--focus: var(--wp--preset--color--accent);
    --wp--custom--color--focus-contrast: var(--wp--preset--color--primary);
}

:is(.has-light-background-color, .has-secondary-background-color, .has-accent-background-color, .has-neutral-light-background-color, .has-neutral-medium-background-color, .wp-block-cover.is-light) > * {
    --wp--custom--color--focus: var(--wp--preset--color--primary);
    --wp--custom--color--focus-contrast: var(--wp--preset--color--light);
}

/* Headings
========================================================================== */

/* Parent CSS uses the parent's palette slugs; map them to this palette. */
:root {
    --wp--preset--color--white: var(--wp--preset--color--light);
    --wp--preset--color--black: var(--wp--preset--color--dark);
    --wp--preset--color--neutral-1: var(--wp--preset--color--neutral-dark);
    --wp--preset--color--neutral-2: var(--wp--preset--color--neutral-light);
    --wp--preset--color--neutral-3: var(--wp--preset--color--background-light-1);
}

/* Paragraphs
========================================================================== */

/* Body text in the content is serif, as on the old site. */
main :where(p, li):not(.is-style-eyebrow) {
    font-family: var(--wp--preset--font-family--serif);
    letter-spacing: 0.3px;
}

main p strong {
    font-family: var(--wp--preset--font-family--paragraph);
}

/* Typography spacing
========================================================================== */

/* Text rendering
========================================================================== */

/* Live uses the browser's default smoothing; the parent's antialiased draws text thinner on macOS. */
body {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

/* Links
========================================================================== */

/* Lists
========================================================================== */

/* Buttons
========================================================================== */

/* Primary button (core) */

/* Secondary button */
.is-style-button-secondary .wp-block-button__link {
    background-color: var(--wp--preset--color--dark);
    color: var(--wp--preset--color--light);
}

/* Imported pages still use the old black button colour without a text colour. */
.wp-block-button__link:is(.has-dark-background-color, .has-black-background-color):not(.has-text-color) {
    color: var(--wp--preset--color--light);
}

.is-style-button-secondary .wp-block-button__link:hover,
.wp-block-button__link:is(.has-dark-background-color, .has-black-background-color):hover {
    background-color: var(--wp--preset--color--light);
    color: var(--wp--preset--color--dark);
}

/* Outline button (core) */

/* Inputs
========================================================================== */

/* Label */

/* Input fields */

/* Select */

/* Checkbox & radio button */

/* Focus and active statements */

/* Acceptance */

/* Submit */

/* Contact form 7
========================================================================== */

/* Labels follow the body text size. The parent sets every label to the xs
   preset, so a site with larger body text would get smaller form labels. */
.wpcf7-form label {
    font-size: inherit;
}

/* Forms: labels above the fields, half-width fields where tagged, full width otherwise. */
.wpcf7-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: var(--wp--preset--spacing--s) var(--wp--preset--spacing--s);
}

.wpcf7-form > p {
    grid-column: 1 / -1;
    margin: 0;
}

.wpcf7-form > p:has(.form-half) {
    grid-column: auto;
}

main .wpcf7-form p {
    max-width: none;
}

.wpcf7-form label {
    display: block;
    font-family: var(--wp--preset--font-family--button);
    font-size: var(--wp--preset--font-size--xs);
}

.wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    margin-top: var(--wp--preset--spacing--xxs);
}

.wpcf7-form :is(input[type='text'], input[type='email'], input[type='tel'], textarea) {
    width: 100%;
    padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--s);
    border: 0;
    border-bottom: 1px solid var(--wp--preset--color--dark);
    border-radius: 0;
    background-color: var(--wp--preset--color--light);
    color: var(--wp--preset--color--dark);
    font-family: var(--wp--preset--font-family--button);
    font-size: var(--wp--preset--font-size--xs);
    line-height: 1.6;
}

.wpcf7-form textarea {
    padding: var(--wp--preset--spacing--s);
}

.wpcf7-form .wpcf7-acceptance {
    font-size: var(--wp--preset--font-size--xxs);
}

.wpcf7-form .wpcf7-acceptance a {
    color: inherit;
}

.wpcf7-form .wpcf7-acceptance label {
    font-family: inherit;
    font-size: inherit;
}

.wpcf7-form .wpcf7-acceptance input[type='checkbox'] {
    border: 1px solid var(--wp--preset--color--dark);
    background-color: var(--wp--preset--color--light);
}

.wpcf7-form .wpcf7-submit {
    width: auto;
    padding: var(--wp--preset--spacing--xxs) calc(var(--wp--preset--spacing--xs) + var(--wp--preset--spacing--tiny));
    border: 0;
    border-radius: 0;
    background-color: var(--wp--preset--color--dark);
    color: var(--wp--preset--color--light);
    font-family: var(--wp--preset--font-family--button);
    font-size: var(--wp--preset--font-size--button);
    font-weight: 400;
    line-height: 1.5;
    transition: all 150ms linear;
}

.wpcf7-form .wpcf7-submit:hover {
    background-color: var(--wp--preset--color--light);
    color: var(--wp--preset--color--dark);
}

@media (max-width: 767px) {
    .wpcf7-form > p:has(.form-half) {
        grid-column: 1 / -1;
    }
}

/* Media
========================================================================== */

/* Images */

/* Video */

/* Iframe & embedded */

/* ==========================================================================
Layout
========================================================================== */

/* Paddings and margins
========================================================================== */

main {
    margin-top: calc(var(--wp--custom--header-height--total) + 0px);
}

/* Section spacing for the whole site; editor.css uses the same value. */
.qt-section,
.wp-block-qase-blocks-section {
    --qt-section-spacing: var(--wp--preset--spacing--xxl);
}

/* :first-of-type beats the parent's 0 above an opening hero. */
main > .qt-section:not(.container-fullwidth),
:is(.entry-content, .entry-content > .em) > .qt-section:not(.container-fullwidth),
main > .qt-section:first-of-type:not(.is-style-breadcrumbs, .container-fullwidth),
:is(.entry-content, .entry-content > .em) > .qt-section:first-of-type:not(.container-fullwidth) {
    padding-top: var(--qt-section-spacing);
    padding-bottom: var(--qt-section-spacing);
}

/* Max widths
========================================================================== */

/* Grids
========================================================================== */

/* :where() so block styles with their own gap still win. */
:where(.qt-section__inner).grid {
    column-gap: var(--wp--custom--content-size-gutter--default);
}

/* ==========================================================================
Announcement bar
========================================================================== */

/* ==========================================================================
Top bar
========================================================================== */

/* ==========================================================================
Header
========================================================================== */

/* Desktop menu
========================================================================== */

header.wp-block-template-part {
    background-color: var(--wp--preset--color--light);
    color: var(--wp--preset--color--dark);
    transition: background-color 200ms linear;
}

.qt-section.is-style-header-top {
    padding-inline: calc(var(--wp--preset--spacing--m) + var(--wp--preset--spacing--xxs));
    background-color: transparent;
    border-bottom-color: transparent;
}

.is-style-header-top .qt-container:has(.mega-menu:not(.mega-menu-mobile)) {
    justify-content: flex-end;
}

header .mega-menu:not(.mega-menu-mobile) .menu {
    gap: 0;
}

header .mega-menu:not(.mega-menu-mobile) .menu-item a {
    padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--s);
    font-size: var(--wp--preset--font-size--xs);
    text-transform: uppercase;
}

header .mega-menu:not(.mega-menu-mobile) .menu > .menu-item:last-child > a {
    padding-right: 0;
}

header .mega-menu:not(.mega-menu-mobile) .menu-item a:hover {
    text-decoration: underline;
    text-underline-position: under;
}

header .mega-menu .current-menu-item > a,
header .mega-menu .current-menu-ancestor > a {
    font-weight: 600;
}

/* Dropdown: a white box with a black top line, like the old site. */
@media (min-width: 1101px) {
    header .mega-menu:not(.mega-menu-mobile) .mega-menu-toggle {
        display: none;
    }

    header .mega-menu:not(.mega-menu-mobile) .mega-menu-item-parent:not(.mega-menu-item) > .sub-menu {
        padding: 0;
        border-top: 2px solid var(--wp--preset--color--dark);
        background-color: var(--wp--preset--color--light);
        color: var(--wp--preset--color--dark);
        line-height: 1.6;
    }

    header .mega-menu:not(.mega-menu-mobile) .mega-menu-item-parent:not(.mega-menu-item):focus-within > .sub-menu {
        display: block;
    }

    header .mega-menu:not(.mega-menu-mobile) .sub-menu .menu-item a {
        font-size: var(--wp--preset--font-size--xxs);
    }
}

/* Over an opening hero the header is see-through with white text, like the old site, until the page scrolls. */
body.has-hero:not(.is-scrolled) header.wp-block-template-part {
    background-color: transparent;
    color: var(--wp--preset--color--light);
}

body.has-hero:not(.is-scrolled) .is-style-header-top {
    border-bottom-color: transparent;
}

/* The mobile menu panel is white, so it must not inherit the white hero text. */
body.has-hero:not(.is-scrolled) header .mega-menu-mobile {
    color: var(--wp--preset--color--dark);
}

body.has-hero:not(.is-scrolled) header .wp-block-site-logo img {
    filter: brightness(0) invert(1);
}

body.has-hero:not(.is-scrolled) header .hamburger-icon,
body.has-hero:not(.is-scrolled) header .hamburger-icon::before,
body.has-hero:not(.is-scrolled) header .hamburger-icon::after {
    background-color: var(--wp--preset--color--light);
}

body.has-hero main {
    margin-top: 0;
}

/* Site logo */
header .wp-block-site-logo img {
    width: 261px;
    height: auto;
    max-width: none;
}

/* Live keeps an 80px header on phones (the parent drops it to 60px under 671px). */
@media (max-width: 767px) {
    :root {
        --wp--custom--header-height--top: 80px;
    }

    .qt-section.is-style-header-top {
        padding-inline: var(--wp--preset--spacing--xs);
    }

    header .wp-block-site-logo img {
        width: auto;
        height: 30px;
    }

    .is-style-header-top .qt-container:has(.hamburger) {
        justify-self: end;
    }

    #toggle-hamburger {
        margin-right: calc(var(--wp--preset--spacing--xxs) * -1);
    }
}

/* The empty hamburger column kept a 32px gap, so the menu ended 72px from the edge (live: 40px). */
@media (min-width: 1101px) {
    .is-style-header-top .qt-section__inner.grid {
        grid-template-columns: auto 1fr;
    }

    .is-style-header-top .qt-container:has(.hamburger) {
        display: none;
    }
}

/* The parent's `ul + ul` margin (global.css) pushed the admin bar's right side down. */
#wpadminbar :is(ul, ol) + :is(ul, ol) {
    margin-top: 0 !important;
}

/* Between WP's mobile bar (782px) and 1100px the labels don't fit on one row, so show icons only. */
@media (min-width: 783px) and (max-width: 1100px) {
    #wpadminbar #wp-admin-bar-root-default > li:not(#wp-admin-bar-comments) > .ab-item {
        font-size: 0;
    }

    #wpadminbar #wp-admin-bar-root-default > li:not(#wp-admin-bar-comments) > .ab-item :is(.ab-label, .rank-math-text) {
        display: none;
    }
}

/* On phones the admin bar scrolls away, so the fixed header goes to the top. */
@media (max-width: 600px) {
    .admin-bar.is-scrolled header.wp-block-template-part {
        top: 0;
    }
}

/* Header button */

/* Hamburger icon
========================================================================== */

/* User toolbar
========================================================================== */

/* Search bar
========================================================================== */

/* ==========================================================================
Footer
========================================================================== */

/* Navigation
========================================================================== */

.single footer.wp-block-template-part {
    border-top: 1px solid var(--wp--preset--color--dark);
}

footer.wp-block-template-part {
    font-size: var(--wp--preset--font-size--xs);
    /* Live keeps the 19px body line height in the footer. */
    line-height: calc(var(--wp--preset--font-size--s) * 1.6);
}

.is-style-footer-top .footer-heading,
footer .is-style-footer-heading {
    font-size: var(--wp--preset--font-size--footer-heading);
    font-weight: 700;
    margin-bottom: var(--wp--preset--spacing--xs);
}

footer :is(.footer-menu, .wp-block-latest-posts) a {
    text-decoration: none;
}

footer :is(.footer-menu, .wp-block-latest-posts) a:hover {
    text-decoration: underline;
}

footer .footer-menu .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--wp--preset--spacing--xxs) + var(--wp--preset--spacing--tiny));
    margin: 0;
    padding: 0;
}

footer .wp-block-latest-posts {
    margin: 0;
    padding: 0;
    list-style: none;
}

footer .wp-block-latest-posts li {
    margin: 0 0 calc(var(--wp--preset--spacing--xxs) + var(--wp--preset--spacing--tiny));
    padding-left: 0;
}

.is-style-footer-top {
    background-color: var(--wp--preset--color--light);
}

.qt-section.is-style-footer-top {
    padding-top: var(--wp--preset--spacing--xl);
    padding-bottom: calc(var(--wp--preset--spacing--m) + var(--wp--preset--spacing--tiny));
}

.is-style-footer-top .grid {
    row-gap: var(--wp--preset--spacing--l);
}

.is-style-footer-top p:not(.footer-heading, .is-style-footer-heading) {
    font-size: var(--wp--preset--font-size--s);
    margin-bottom: calc(var(--wp--preset--spacing--xs) + var(--wp--preset--spacing--tiny));
}

footer .is-style-footer-heading + p {
    padding-top: var(--wp--preset--spacing--tiny);
}

/* Copyright only, centred at 14px like live (without live's "| Qase"). */
.qt-section.is-style-footer-bottom {
    padding-top: 0;
    padding-bottom: var(--wp--preset--spacing--s);
    border-top: 0;
    background-color: var(--wp--preset--color--light);
}

.is-style-footer-bottom p {
    margin: 0;
    font-size: var(--wp--preset--font-size--xxs);
}

@media (max-width: 767px) {
    .is-style-footer-top {
        text-align: center;
    }

    footer .footer-menu .menu {
        align-items: center;
    }
}

/* ==========================================================================
Utility classes
========================================================================== */

/* ==========================================================================
Components and modules
========================================================================== */

/* Breadcrumbs
========================================================================== */

/* Pagination
========================================================================== */

/* Current, hover */

/* Prev, next */

/* Accordion
========================================================================== */

/* Accordion heading */

/* Accordion content */

/* Accordion icon */

/* Tabs
========================================================================== */

/* Splide slider
========================================================================== */

/* Slider header */

/* ==========================================================================
Styles for pages, sections, blocks and others.
========================================================================== */

/* Page: Search results
========================================================================== */

/* Section: Hero
========================================================================== */

/* The hero's look lives here so the blocks inside carry only content. */
:is(.is-style-hero, .is-style-subhero):is(.qt-section, .wp-block-qase-blocks-section) {
    background-color: var(--wp--preset--color--background-light-1);
}

:is(.is-style-hero, .is-style-subhero) .wp-block-heading {
    font-size: var(--wp--preset--font-size--xxl);
    margin-bottom: 0;
}

:is(.is-style-hero, .is-style-subhero) .wp-block-cover .wp-block-heading {
    color: var(--wp--preset--color--light);
}

:is(.is-style-hero, .is-style-subhero) .wp-block-cover {
    padding-top: calc(var(--wp--custom--header-height--top) + var(--wp--preset--spacing--m));
}

@media (max-width: 767px) {
    :is(.is-style-hero, .is-style-subhero) .wp-block-cover {
        padding-inline: var(--wp--preset--spacing--m);
    }
}

:is(.is-style-hero, .is-style-subhero) .is-style-eyebrow {
    display: inline-block;
    margin-bottom: var(--wp--preset--spacing--xs);
    padding: 0 var(--wp--preset--spacing--xxs);
    letter-spacing: 0.3px;
    /* Live inherits the 19px body line height here. */
    line-height: calc(var(--wp--preset--font-size--s) * 1.6);
    background-color: var(--wp--preset--color--dark);
    color: var(--wp--preset--color--light);
    font-size: var(--wp--preset--font-size--xxs);
}

:is(.is-style-hero, .is-style-subhero) p:not(.is-style-eyebrow) {
    font-size: var(--wp--preset--font-size--s);
}

/* Section: Subhero
========================================================================== */

/* Live's inner page tops: 480px with the content centred under the see-through header. */
.is-style-subhero .wp-block-cover {
    min-height: 480px;
    padding-bottom: var(--wp--custom--header-height--top);
}

/* Section: Stacked boxes
========================================================================== */

/* Slider - Logos
========================================================================== */

/* Archive: Category
========================================================================== */

/* Page: Articles
========================================================================== */

.articles.grid,
.latest-articles.grid {
    grid-gap: var(--wp--style--block-gap);
}

/* Filter buttons */
.articles__filter-buttons {
    margin-bottom: calc(2 * var(--wp--style--block-gap));
    margin-top: 0;
    align-items: center;
}

.articles__filter-buttons::before {
    content: 'Filtrera:';
    font-weight: 500;
    font-size: var(--wp--preset--font-size--m);
}

/* The active filter is filled, so it differs from the others by more than
   colour (WCAG 1.4.1). The old rule used teal slugs that the palette lacks,
   so the active filter looked like all the others. */
.articles__filter-buttons .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--primary);
}

.articles__filter-buttons .wp-block-button__link:is(.active, [aria-current]) {
    background-color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
}

/* Card */

/* Single: Article
========================================================================== */

/* Section: Employees
========================================================================== */

/* Section: Testimonial slider
========================================================================== */

/* Testimonial card */

/* Section: Image gallery with lightbox
========================================================================== */

/* Section: FAQ
========================================================================== */

/* Section: Band primary
========================================================================== */

.is-style-band-primary:is(.qt-section, .wp-block-qase-blocks-section) {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
}

.is-style-band-primary .wp-block-heading {
    color: inherit;
}

.is-style-band-primary .wp-block-image.aligncenter {
    display: table;
    margin-inline: auto;
}

/* Section: Text
========================================================================== */

/* Plain text sections, like live: paragraphs at 85% width and tighter sub-headings. */
:is(.entry-content, .entry-content > .em) > .qt-section:not([class*='is-style-']) :is(.qt-container, .qt-container > .wp-block-columns > .wp-block-column) > p {
    max-width: 85%;
}

:is(.entry-content, .entry-content > .em) > .qt-section:not([class*='is-style-']) :is(.qt-container, .qt-container > .wp-block-columns > .wp-block-column) > .wp-block-heading:not(:first-child) {
    margin-top: var(--wp--preset--spacing--s);
}

@media (max-width: 767px) {
    :is(.entry-content, .entry-content > .em) > .qt-section:not([class*='is-style-']) :is(.qt-container, .qt-container > .wp-block-columns > .wp-block-column) > p {
        max-width: none;
    }

    h3.wp-block-heading {
        font-size: var(--wp--preset--font-size--s);
    }
}

/* Section: Logo grid
========================================================================== */

/* Member logos: four per row, two on phones, like live. */
.is-style-logo-grid > .qt-section__inner {
    gap: calc(var(--wp--preset--spacing--m) + var(--wp--preset--spacing--xxs));
}

/* Logos keep their own size (most are 165x70) instead of filling the column. */
.is-style-logo-grid .wp-block-image img {
    width: auto;
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .is-style-logo-grid > .qt-section__inner.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Section: Bands (primary, dark, blue)
========================================================================== */

/* Live's bands are at least 430px with the content centred. */
:is(.is-style-band-primary, .is-style-band-dark, .is-style-band-blue):is(.qt-section, .wp-block-qase-blocks-section) {
    --qt-section-spacing: var(--wp--preset--spacing--xxxl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
}

:is(.is-style-band-primary, .is-style-band-dark, .is-style-band-blue) > .qt-section__inner {
    width: 100%;
}

/* A band that opens the page is its title band, 300px like live's policy page. */
:is(.entry-content, .entry-content > .em) > :is(.is-style-band-primary, .is-style-band-dark, .is-style-band-blue):first-child {
    min-height: 300px;
}

:is(.is-style-band-primary, .is-style-band-dark, .is-style-band-blue) .wp-block-image {
    margin-bottom: var(--wp--preset--spacing--xs);
}

:is(.is-style-band-primary, .is-style-band-dark, .is-style-band-blue) .wp-block-image + .wp-block-heading {
    margin-top: 0;
}

:is(.is-style-band-primary, .is-style-band-dark, .is-style-band-blue) .wp-block-heading + .wp-block-buttons {
    margin-top: calc(var(--wp--preset--spacing--m) + var(--wp--preset--spacing--xxs));
}

/* Section: Band dark
========================================================================== */

.is-style-band-dark:is(.qt-section, .wp-block-qase-blocks-section) {
    background-color: var(--wp--preset--color--dark);
    color: var(--wp--preset--color--light);
}

.is-style-band-dark .wp-block-heading {
    color: var(--wp--preset--color--blue);
}

/* Section: Band blue
========================================================================== */

.is-style-band-blue:is(.qt-section, .wp-block-qase-blocks-section) {
    background-color: var(--wp--preset--color--blue);
    color: var(--wp--preset--color--light);
}

.is-style-band-blue .wp-block-heading {
    color: inherit;
}

:is(.is-style-band-dark, .is-style-band-blue) .wp-block-image.aligncenter {
    display: table;
    margin-inline: auto;
}

/* Block: Zigzag posts
========================================================================== */

.zigzag-posts {
    margin-top: var(--wp--preset--spacing--l);
}

.zigzag-posts__item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto auto auto 1fr;
}

.zigzag-posts__item > * {
    grid-column: 2;
    margin: 0 var(--wp--preset--spacing--xl);
}

.zigzag-posts__image {
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
}

/* The image fills the whole row when the text is taller than 3:2, like live. */
.zigzag-posts__image {
    position: relative;
}

/* At least 3:2; aspect-ratio would widen the column when the row is taller. */
.zigzag-posts__image::before {
    content: '';
    display: block;
    padding-top: 66.667%;
}

.zigzag-posts__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zigzag-posts__title {
    grid-row: 2;
    margin-bottom: var(--wp--preset--spacing--xs);
    font-size: var(--wp--preset--font-size--xl);
}

.zigzag-posts__excerpt {
    grid-row: 3;
    max-width: 400px;
}

.zigzag-posts__button {
    grid-row: 4;
    justify-self: start;
    margin-top: var(--wp--preset--spacing--xs);
}

.zigzag-posts__button a {
    display: inline-block;
    font-family: var(--wp--preset--font-family--button);
    font-size: var(--wp--preset--font-size--button);
    line-height: 1.5;
    padding: var(--wp--preset--spacing--xxs) calc(var(--wp--preset--spacing--xs) + var(--wp--preset--spacing--tiny));
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--dark);
    text-decoration: none;
    transition: all 150ms linear;
}

.zigzag-posts__button a:hover {
    color: var(--wp--preset--color--light);
}

/* Every other row puts the image on the right. */
.zigzag-posts__item:nth-child(even) > * {
    grid-column: 1;
}

.zigzag-posts__item:nth-child(even) .zigzag-posts__image {
    grid-column: 2;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .zigzag-posts__item > :not(.zigzag-posts__image) {
        margin-inline: var(--wp--preset--spacing--m);
    }
}

@media (max-width: 767px) {
    .zigzag-posts__item {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        margin-bottom: var(--wp--preset--spacing--l);
    }

    .zigzag-posts__item > *,
    .zigzag-posts__item:nth-child(even) > *,
    .zigzag-posts__item:nth-child(even) .zigzag-posts__image {
        grid-column: 1;
        grid-row: auto;
        margin-inline: 0;
    }

    .zigzag-posts__image {
        margin-bottom: var(--wp--preset--spacing--s);
    }
}

/* Page: Events Manager
========================================================================== */

/* Single events and locations have no section around them, so the content width is set here. */
:is(.single-event, .single-location) .entry-content > .em-view-container {
    max-width: var(--wp--custom--maxwidth--default);
    margin: 0 auto;
    padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--m);
}

.em.em {
    --font-family: var(--wp--preset--font-family--paragraph);
    --accent-color: var(--wp--preset--color--dark);
    --accent-color-hover: var(--wp--preset--color--primary);
    --text-color-normal: var(--wp--preset--color--dark);
    --main-h3-color: var(--wp--preset--color--dark);
}

/* EM sets heading weight, size and spacing with !important. */
.em.em.pixelbones :is(h1, h2, h3),
.em-item-single h3 {
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 700 !important;
    letter-spacing: normal !important;
    color: var(--wp--preset--color--dark);
}

.em.em.pixelbones h2 {
    font-size: var(--wp--preset--font-size--xl) !important;
}

.em.em.pixelbones h3,
.em-item-single h3 {
    font-size: var(--wp--preset--font-size--s) !important;
}

.em.pixelbones.em-item-single h3 {
    margin-top: var(--wp--preset--spacing--m) !important;
}

/* Form labels and the consent text stay sans-serif, as on the old site. */
.em.pixelbones :is(label, legend),
.em.pixelbones .input-field-data_privacy_consent {
    font-family: var(--wp--preset--font-family--paragraph);
}

/* Events list */
table.events-table {
    width: 100%;
}

.css-events-list table.events-table th.event-time {
    width: 300px;
}

.wp-block-button.eventlink a {
    display: inline-block;
    margin-top: var(--wp--preset--spacing--xs);
    padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--xs);
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--dark);
    line-height: 1.5;
    font-size: var(--wp--preset--font-size--button);
    text-decoration: none;
    transition: all 150ms linear;
}

.wp-block-button.eventlink a:hover {
    color: var(--wp--preset--color--light);
}

/* EM resets link colours and backgrounds with !important. */
.em.pixelbones .wp-block-button.eventlink a {
    background-color: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--dark) !important;
}

.em.pixelbones .wp-block-button.eventlink a:hover {
    color: var(--wp--preset--color--light) !important;
}

.wp-block-button.eventlink a::before {
    content: 'Anmälan ';
}

/* Booking form */
.em.em-event-booking-form {
    margin-top: var(--wp--preset--spacing--l);
}

/* EM sets the title size with !important. */
.em.em-event-booking-form h3.em-booking-section-title {
    font-size: var(--wp--preset--font-size--xs) !important;
    font-weight: 700 !important;
    margin-top: 0;
}

.em-tickets-spaces {
    display: inline-grid;
}

.em.pixelbones :is(input:not([type='checkbox'], [type='radio'], [type='submit']), select, textarea) {
    border: 1px solid var(--wp--preset--color--neutral-dark);
    border-radius: 0;
}

.input-field-data_privacy_consent {
    font-size: var(--wp--preset--font-size--xxs);
}

/* EM marks every button rule !important, so these must too. */
.em.pixelbones.input .em-booking-buttons input.em-booking-submit.em-button {
    background-color: var(--wp--preset--color--primary) !important;
    border-color: var(--wp--preset--color--primary) !important;
    border-radius: 0 !important;
    color: var(--wp--preset--color--dark) !important;
    font-size: var(--wp--preset--font-size--button) !important;
    font-weight: 400 !important;
}

.em.pixelbones.input .em-booking-buttons input.em-booking-submit.em-button:is(:hover, :focus-visible) {
    color: var(--wp--preset--color--light) !important;
}

/* The events table stacks into cards on tablets and phones. */
@media (max-width: 1025px) {
    .em table.events-table,
    .em table.events-table :is(tbody, tr, td, th) {
        display: grid;
    }

    .em table.events-table thead {
        display: none;
    }

    .em table.events-table tbody::before {
        content: 'Nästa evenemang';
        display: block;
        font-family: var(--wp--preset--font-family--heading);
        font-size: var(--wp--preset--font-size--l);
        font-weight: 700;
    }

    .em table.events-table tbody tr td:nth-of-type(2)::before {
        content: 'Datum/Tid';
        display: block;
        margin: var(--wp--preset--spacing--xxs) 0;
        font-weight: 700;
    }

    .em table.events-table tbody tr:not(:first-of-type) {
        margin-top: var(--wp--preset--spacing--m);
        border-top: 1px solid var(--wp--preset--color--dark);
    }
}

@media (max-width: 767px) {
    .css-events-list table.events-table th.event-time {
        width: 100%;
    }
}

/* Single: Post
========================================================================== */

/* Live's post H3 is 1.2 times the body size. */
.single-post .entry-content h3 {
    font-size: calc(var(--wp--preset--font-size--s) * 1.2);
}

.single-post .entry-content > .wp-block-cover + * {
    margin-top: calc(var(--wp--preset--spacing--m) + var(--wp--preset--spacing--xxs));
}

/* Imported posts use empty paragraphs as spacers; stop their margins from collapsing away. */
.single-post .entry-content > p:empty {
    padding-top: 1px;
}

.single-post main > .qt-section:first-of-type:not(.container-fullwidth) {
    padding-top: calc(var(--wp--preset--spacing--xl) + var(--wp--preset--spacing--tiny));
    padding-bottom: calc(2 * var(--wp--preset--spacing--xl) + var(--wp--preset--spacing--s));
}

@media (max-width: 767px) {
    .single-post .entry-content h3 {
        font-size: var(--wp--preset--font-size--s);
    }
}
