/*
 * Small project-owned bridge between CMS markup and imported brand CSS.
 * Keep external theme files copied as-is; put local CMS adjustments here.
 */

body[class*="theme-"] {
    margin: 0;
    background: var(--cms-page-background);
    color: var(--cms-text-color);
    font-family: var(--cms-font-body);
    line-height: 1.5;
}

body[class*="theme-"] main {
    min-height: 100vh;
}

body.theme-tryg-dk {
    --s-color-background-section: #ededed;
    --cms-page-background: #fff;
    --cms-surface-background: #fff;
    --cms-section-background-muted: #ededed;
    --cms-text-color: #262626;
    --cms-text-muted: #767676;
    --cms-heading-color: #262626;
    --cms-link-color: #ce0303;
    --cms-link-hover-color: #b00000;
    --cms-border-color: #e1e1e1;
    --cms-font-body: "27Sans", "Fira Sans", Helvetica, Arial, sans-serif;
    --cms-font-heading: "27Sans", "Fira Sans", Helvetica, Arial, sans-serif;
    --cms-section-width-narrow: 48.125rem;
    --cms-section-width-normal: 73.125rem;
    --cms-section-width-wide: none;
    --cms-section-spacing-small: 1.5rem;
    --cms-section-spacing-medium: 3rem;
    --cms-section-spacing-large: 4.5rem;
    --cms-content-gap: 1.5rem;
}

body.theme-tryg-dk .header.deck {
    position: relative;
}

body.theme-tryg-dk .header .top-navigation-bg {
    display: none;
}

@media (min-width: 64em) {
    body.theme-tryg-dk .header .top-navigation-bg {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
        width: 100%;
        height: 2.625rem;
        background-color: #ededed;
    }

    body.theme-tryg-dk .header .w--wide {
        position: relative;
        z-index: 1;
    }

    body.theme-tryg-dk .header .top-navigation {
        display: block;
        float: none;
        height: 2.625rem;
        text-align: right;
    }

    body.theme-tryg-dk .header .top-navigation .top-navigation__menu__item {
        display: inline-block;
        font-size: 1rem;
    }

    body.theme-tryg-dk .header .top-navigation .top-navigation__menu__item.is-active {
        background-color: #fff;
    }

    body.theme-tryg-dk .header .top-navigation .top-navigation__menu__item a {
        display: inline-block;
        padding: 0.625rem 1.25rem;
        text-transform: uppercase;
        font-size: 1rem;
        font-weight: 400;
        color: #262626;
    }

    body.theme-tryg-dk .header .top-navigation .top-navigation__menu__item.is-active a {
        font-weight: 700;
        color: #262626;
    }
}

body.theme-tryg-dk .header,
body.theme-tryg-dk .header .top-navigation,
body.theme-tryg-dk .header .main-navigation,
body.theme-tryg-dk .footer {
    font-family: "27Sans", "Fira Sans", Helvetica, Arial, sans-serif;
}

body.theme-tryg-dk.is-fixed {
    overflow: hidden;
}

body.theme-tryg-dk .header .logo img {
    display: block;
    max-width: 7.813rem;
    width: auto;
    height: auto;
}

body.theme-tryg-dk .header .main-navigation__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.theme-tryg-dk .header .login-wrapper ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.theme-tryg-dk .header .sub-menu__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.theme-tryg-dk .flag-icon {
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
    position: relative;
    display: inline-block;
    width: 1.33333333em;
    line-height: 1em;
}

body.theme-tryg-dk .flag-icon::before {
    content: "\00a0";
}

body.theme-tryg-dk .header .top-navigation__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.theme-tryg-dk .header .login-wrapper a {
    text-decoration: none;
}

body.theme-tryg-dk .header .main-navigation__menu a,
body.theme-tryg-dk .header .top-navigation__menu a {
    text-decoration: none;
}

body.theme-tryg-dk .header .sub-menu__selected-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.theme-tryg-dk .footer__bottom__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.theme-tryg-dk .cms-product-tile {
    width: 100%;
    min-height: 10.9375rem;
    padding: 1.75rem 1rem 1.25rem;
    border: 1px solid #e1e1e1;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: none;
    gap: 0.75rem;
}

body.theme-tryg-dk .cms-product-tile:hover,
body.theme-tryg-dk .cms-product-tile:focus {
    border-color: #ce0303;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

body.theme-tryg-dk .cms-product-tile__badge {
    background: #ce0303;
    font-family: "27Sans", Helvetica, Arial, sans-serif;
}

body.theme-tryg-dk .cms-product-tile__icon {
    width: 3rem;
    height: 3rem;
}

body.theme-tryg-dk .cms-product-tile__icon img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

body.theme-tryg-dk .cms-product-tile__title {
    font-family: "27Sans", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #262626;
}

body.theme-tryg-dk .cms-product-tile__subtitle {
    display: none;
}

body.theme-trygghansa-se {
    --cms-page-background: var(--th-theme-background-base, #fff);
    --cms-surface-background: var(--th-theme-fill-white, #fff);
    --cms-section-background-muted: var(--th-theme-background-alternative, #f9f9f9);
    --cms-text-color: var(--th-theme-text-weak, #4a4a4a);
    --cms-text-muted: var(--th-theme-text-weak, #4a4a4a);
    --cms-heading-color: var(--th-theme-text-strong, #191919);
    --cms-link-color: var(--th-theme-text-brand, #e50000);
    --cms-link-hover-color: var(--th-theme-fill-brand-hover, #db0000);
    --cms-border-color: var(--th-theme-stroke-weak, #dedede);
    --cms-font-body: var(--th-theme-family-body, Arial, Helvetica, sans-serif);
    --cms-font-heading: var(--th-theme-family-heading, "ApexNew", Arial, Helvetica, sans-serif);
    --cms-section-width-narrow: 48rem;
    --cms-section-width-normal: 74rem;
    --cms-section-width-wide: 82rem;
    --cms-section-spacing-small: 1.5rem;
    --cms-section-spacing-medium: 3.5rem;
    --cms-section-spacing-large: 5rem;
    --cms-content-gap: 1.75rem;
}

body.theme-tryg-no {
    --cms-page-background: #f8faf6;
    --cms-surface-background: #fff;
    --cms-section-background-muted: #f1f1f1;
    --cms-text-color: #222222;
    --cms-text-muted: #5a5a5a;
    --cms-heading-color: #222222;
    --cms-link-color: #ce0303;
    --cms-link-hover-color: #ce0303;
    --cms-border-color: #e1e1e1;
    --cms-font-body: "27 Sans", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --cms-font-heading: "27 Sans", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --cms-section-width-narrow: 48rem;
    --cms-section-width-normal: 71.25rem;
    --cms-section-width-wide: 100rem;
    --cms-section-spacing-small: 1.5rem;
    --cms-section-spacing-medium: 2.75rem;
    --cms-section-spacing-large: 4rem;
    --cms-content-gap: 1.25rem;
}

body[class*="theme-"] .cms-section {
    color: var(--cms-text-color);
}

body[class*="theme-"] .cms-section--background-muted {
    background-color: var(--cms-section-background-muted);
}

body[class*="theme-"] .cms-rich-text {
    color: var(--cms-text-color);
    font-family: var(--cms-font-body);
}

body[class*="theme-"] .cms-rich-text h1,
body[class*="theme-"] .cms-rich-text h2,
body[class*="theme-"] .cms-rich-text h3,
body[class*="theme-"] .cms-rich-text h4,
body[class*="theme-"] .cms-rich-text h5,
body[class*="theme-"] .cms-rich-text h6 {
    color: var(--cms-heading-color);
    font-family: var(--cms-font-heading);
    line-height: 1.15;
}

body[class*="theme-"] .cms-rich-text a {
    color: var(--cms-link-color);
}

body[class*="theme-"] .cms-rich-text a:hover,
body[class*="theme-"] .cms-rich-text a:focus {
    color: var(--cms-link-hover-color);
}

body[class*="theme-"] .cms-rich-text hr {
    border: 0;
    border-top: 1px solid var(--cms-border-color);
}

body[class*="theme-"] .cms-hero__heading {
    color: var(--cms-heading-color);
    font-family: var(--cms-font-heading);
}

body[class*="theme-"] .cms-hero__body {
    color: var(--cms-text-muted);
    font-family: var(--cms-font-body);
}

body[class*="theme-"] .cms-hero--has-image .cms-hero__heading,
body[class*="theme-"] .cms-hero--has-image .cms-hero__body {
    color: #fff;
}

body[class*="theme-"] .cms-hero__button {
    background-color: var(--cms-link-color);
    color: #fff;
}

body[class*="theme-"] .cms-hero__button:hover,
body[class*="theme-"] .cms-hero__button:focus {
    background-color: var(--cms-link-hover-color);
}

body[class*="theme-"] .cms-button--primary {
    background-color: var(--cms-link-color);
    color: #fff;
}

body[class*="theme-"] .cms-button--primary:hover,
body[class*="theme-"] .cms-button--primary:focus {
    background-color: var(--cms-link-hover-color);
    color: #fff;
}

body[class*="theme-"] .cms-button--secondary {
    background-color: transparent;
    color: var(--cms-link-color);
    border-color: var(--cms-link-color);
}

body[class*="theme-"] .cms-button--secondary:hover,
body[class*="theme-"] .cms-button--secondary:focus {
    background-color: var(--cms-link-color);
    color: #fff;
}

body[class*="theme-"] .cms-page-teaser__body,
body[class*="theme-"] .cms-page-teaser__bottom-text,
body[class*="theme-"] .cms-cta__body,
body[class*="theme-"] .cms-card,
body[class*="theme-"] .cms-accordion__body {
    color: var(--cms-text-color);
    font-family: var(--cms-font-body);
}

body[class*="theme-"] .cms-link-card__title,
body[class*="theme-"] .cms-card__heading,
body[class*="theme-"] .cms-accordion__title,
body[class*="theme-"] .cms-cta__title {
    font-family: var(--cms-font-heading);
}

body.theme-tryg-dk .cms-button {
    border-radius: 0.25rem;
}

body.theme-trygghansa-se .cms-button {
    border-radius: 0.625rem;
}

body.theme-tryg-no .cms-button {
    border-radius: 0.25rem;
}

body.theme-tryg-no {
    background-color: var(--cms-page-background);
}

/* Product tile — per-theme styling (non-DK themes) */
body.theme-trygghansa-se .cms-product-tile {
    border: 0;
    border-radius: 0;
    min-height: 11rem;
    padding: 1.5rem 0.75rem 1rem;
    background: var(--th-theme-fill-white, #fff);
    box-shadow: inset 0 -0.0625rem 0 var(--th-theme-stroke-weak, #dedede);
}

body.theme-trygghansa-se .cms-product-tile:hover,
body.theme-trygghansa-se .cms-product-tile:focus {
    background: var(--th-theme-background-alternative, #f9f9f9);
    box-shadow: none;
}

body.theme-trygghansa-se .cms-product-tile__badge {
    position: static;
    transform: none;
    margin-bottom: 0.25rem;
    border-radius: 0.3125rem;
    background: var(--th-theme-fill-brand-strong, #e50000);
}

body.theme-trygghansa-se .cms-product-tile__title {
    font-family: var(--th-theme-family-heading, "ApexNew", Arial, sans-serif);
}

body.theme-trygghansa-se .cms-product-tile__subtitle {
    display: block;
    font-size: 0.8125rem;
}

@media (max-width: 767px) {
    body.theme-trygghansa-se .cms-product-tile__subtitle {
        display: none;
    }
}

body.theme-tryg-no .cms-product-tile {
    border-radius: 0.25rem;
    border-color: #e1e1e1;
    min-height: 10rem;
}

body.theme-tryg-no .cms-product-tile__title {
    font-family: "27 Sans", sans-serif;
    font-weight: 400;
}

body.theme-tryg-no .cms-product-tile__badge {
    background: #ce0303;
}

/* Facts list — full-width brand-story band inside content sections */
body[class*="theme-"] .cms-section:has(.cms-facts-list.deck) {
    padding-block: 0;
}

body[class*="theme-"] .cms-section:has(.cms-facts-list.deck) .cms-section__inner {
    max-width: none;
    padding-inline: 0;
}

body[class*="theme-"] .cms-section:has(.cms-facts-list.deck) .cms-section__content > * {
    flex: 0 0 100%;
}

body.theme-tryg-dk .cms-facts-list.deck.brand-story {
    padding-block: 2.5rem;
}

body.theme-trygghansa-se .cms-facts-list.th-quick-facts-block {
    width: 100%;
}

body.theme-tryg-no .cms-facts-list.deck.brand-story {
    padding-block: 3rem;
}

/* Tryg NO — brand-story / usp-list (from TrygDesign; not in NO theme bundle) */
body.theme-tryg-no .cms-facts-list.brand-story {
    background-color: #ce0303;
    color: #fff;
}

body.theme-tryg-no .cms-facts-list.brand-story--grey {
    background-color: #535c5e;
    color: #fff;
}

body.theme-tryg-no .cms-facts-list.brand-story--grey-light {
    background-color: #e1e1e1;
    color: #262626;
}

body.theme-tryg-no .cms-facts-list.brand-story a {
    color: inherit;
}

body.theme-tryg-no .cms-facts-list.brand-story .svg-icon {
    fill: currentColor;
}

body.theme-tryg-no .cms-facts-list .brand-story__inner.grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 73.125rem;
    padding-inline: 1rem;
    gap: 1.5rem;
}

body.theme-tryg-no .cms-facts-list .brand-story__headline,
body.theme-tryg-no .cms-facts-list .brand-story__content {
    flex: 1 1 100%;
}

@media (min-width: 48em) {
    body.theme-tryg-no .cms-facts-list .brand-story__headline,
    body.theme-tryg-no .cms-facts-list .brand-story__content {
        flex: 1 1 calc(50% - 0.75rem);
    }
}

body.theme-tryg-no .cms-facts-list .usp-list__item {
    position: relative;
    margin-top: 1.25rem;
}

body.theme-tryg-no .cms-facts-list .usp-list__item:first-child {
    margin-top: 0.625rem;
}

body.theme-tryg-no .cms-facts-list .usp-list__item .icon {
    position: absolute;
    top: 0;
    left: 0;
}

body.theme-tryg-no .cms-facts-list .usp-list .headline,
body.theme-tryg-no .cms-facts-list .usp-list .body {
    padding-left: 3.125rem;
}

body.theme-tryg-no .cms-facts-list .usp-list .headline {
    font-weight: 700;
}

