/* Norrlandswebb SEO Cluster 4.0.1 – scoped public layout foundation. */
:root {
    --nw-font: "Poppins", sans-serif;
    --nw-layout-max: none;
    --nw-layout-width: 70%;
    --nw-layout-mobile: 94%;
    --nw-text: #17191c;
    --nw-heading: #111214;
    --nw-muted: #626870;
    --nw-line: #e4e7eb;
    --nw-soft: #f6f7f8;
    --nw-blue: #1457d9;
    --nw-blue-dark: #0e45b0;
}

/* This file is loaded only on plugin-rendered public pages. */
body.nwseo-plugin-page,
body.nwseo-plugin-page button,
body.nwseo-plugin-page input,
body.nwseo-plugin-page select,
body.nwseo-plugin-page textarea,
body.nwseo-plugin-page optgroup,
body.nwseo-plugin-page table,
body.nwseo-plugin-page h1,
body.nwseo-plugin-page h2,
body.nwseo-plugin-page h3,
body.nwseo-plugin-page h4,
body.nwseo-plugin-page h5,
body.nwseo-plugin-page h6,
body.nwseo-plugin-page p,
body.nwseo-plugin-page a,
body.nwseo-plugin-page li,
body.nwseo-plugin-page span,
body.nwseo-plugin-page strong,
body.nwseo-plugin-page small,
body.nwseo-plugin-page label,
body.nwseo-plugin-page summary {
    font-family: var(--nw-font) !important;
}

/* Neutralise Astra/theme spacing around plugin canvases. This is what removes
 * the unexplained gap above shortcode-driven pages such as /hemsida-pa-din-ort/. */
body.nwseo-plugin-page .site-content,
body.nwseo-plugin-page .site-content > .ast-container,
body.nwseo-plugin-page #primary,
body.nwseo-plugin-page .site-main,
body.nwseo-plugin-page article.page,
body.nwseo-plugin-page article.nwseo_landing,
body.nwseo-plugin-page .entry-content {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.nwseo-plugin-page .site-content > .ast-container,
body.nwseo-plugin-page #primary {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body.nwseo-plugin-directory .entry-header,
body.nwseo-plugin-directory .entry-title {
    display: none !important;
}
body.nwseo-plugin-directory .entry-content > p:empty,
body.nwseo-plugin-directory .entry-content > br {
    display: none !important;
}

/* All public plugin canvases escape the theme's inner content width. */
.nwseo-page,
.nwknowledge-page,
.nwi-page,
.nwil-page,
.nwseo-directory-main {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 calc(50% - 50vw) !important;
    overflow-x: clip;
    background: #fff;
}

.nwseo-page *,
.nwknowledge-page *,
.nwi-page *,
.nwil-page *,
.nwseo-directory-main * {
    box-sizing: border-box;
}

/* Consistent media, controls and focus treatment inside plugin pages. */
.nwseo-page img,
.nwknowledge-page img,
.nwi-page img,
.nwil-page img,
.nwseo-directory-main img {
    border-radius: 6px !important;
    box-shadow: none !important;
}

body.nwseo-plugin-page button,
body.nwseo-plugin-page input,
body.nwseo-plugin-page select,
body.nwseo-plugin-page textarea {
    font: inherit;
}
body.nwseo-plugin-page :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid rgba(20, 87, 217, .2) !important;
    outline-offset: 2px;
}

/* Theme paragraph and heading margins should never leak into plugin sections. */
.nwseo-page :is(h1,h2,h3,p,figure,blockquote),
.nwknowledge-page :is(h1,h2,h3,p,figure,blockquote),
.nwi-page :is(h1,h2,h3,p,figure,blockquote),
.nwil-page :is(h1,h2,h3,p,figure,blockquote),
.nwseo-directory-main :is(h1,h2,h3,p,figure,blockquote) {
    margin-block-start: 0;
}

@media (max-width: 900px) {
    :root { --nw-layout-width: var(--nw-layout-mobile); }
}


/* 5.2.0 – one desktop rhythm on every plugin-rendered public page. */
@media (min-width: 901px) {
    :root {
        --nw-layout-width: 70%;
        --nw-layout-max: none;
    }
}

/* Keep CTA controls visually separated from the copy above them. */
body.nwseo-plugin-page :is(p,h2,h3) + :is(
    .nwseo-button,
    .nwseo-clean-button,
    .nwseo-directory-button,
    .nwi-btn,
    .nwil-btn,
    .nwknowledge-button
) {
    margin-top: 26px !important;
}

/* Theme/Astra/Elementor must never restyle primary plugin buttons on focus/active. */
body.nwseo-plugin-page :is(
    a.nwseo-button:not(.nwseo-button-light), button.nwseo-button,
    a.nwseo-clean-button:not(.nwseo-button-light), button.nwseo-clean-button,
    a.nwi-btn, button.nwi-btn,
    a.nwil-btn, button.nwil-btn,
    a.nwknowledge-button:not(.nwknowledge-button-light), button.nwknowledge-button,
    .nwknowledge-search button,
    a.nwseo-directory-button:not(.nwseo-directory-button-light), button.nwseo-directory-button
),
body.nwseo-plugin-page :is(
    a.nwseo-button:not(.nwseo-button-light), button.nwseo-button,
    a.nwseo-clean-button:not(.nwseo-button-light), button.nwseo-clean-button,
    a.nwi-btn, button.nwi-btn,
    a.nwil-btn, button.nwil-btn,
    a.nwknowledge-button:not(.nwknowledge-button-light), button.nwknowledge-button,
    .nwknowledge-search button,
    a.nwseo-directory-button:not(.nwseo-directory-button-light), button.nwseo-directory-button
):is(:focus,:focus-visible,:active) {
    border-color: var(--nw-blue, #1457d9) !important;
    background: var(--nw-blue, #1457d9) !important;
    background-color: var(--nw-blue, #1457d9) !important;
    background-image: none !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transform: none !important;
    opacity: 1 !important;
}
body.nwseo-plugin-page :is(
    a.nwseo-button:not(.nwseo-button-light), button.nwseo-button,
    a.nwseo-clean-button:not(.nwseo-button-light), button.nwseo-clean-button,
    a.nwi-btn, button.nwi-btn,
    a.nwil-btn, button.nwil-btn,
    a.nwknowledge-button:not(.nwknowledge-button-light), button.nwknowledge-button,
    .nwknowledge-search button,
    a.nwseo-directory-button:not(.nwseo-directory-button-light), button.nwseo-directory-button
):hover {
    border-color: var(--nw-blue-dark, #0e45b0) !important;
    background: var(--nw-blue-dark, #0e45b0) !important;
    background-color: var(--nw-blue-dark, #0e45b0) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Secondary/light controls keep their intended appearance during mouse/keyboard states. */
body.nwseo-plugin-page .nwseo-button-light,
body.nwseo-plugin-page .nwseo-button-light:is(:focus,:focus-visible,:active),
body.nwseo-plugin-page .nwseo-directory-button-light,
body.nwseo-plugin-page .nwseo-directory-button-light:is(:focus,:focus-visible,:active) {
    border-color: var(--nw-heading, #111214) !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--nw-heading, #111214) !important;
    -webkit-text-fill-color: var(--nw-heading, #111214) !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
}
body.nwseo-plugin-page .nwknowledge-button-light,
body.nwseo-plugin-page .nwknowledge-button-light:is(:focus,:focus-visible,:active) {
    border-color:#fff !important;
    background:#fff !important;
    background-color:#fff !important;
    background-image:none !important;
    color:var(--nw-heading, #111214) !important;
    -webkit-text-fill-color:var(--nw-heading, #111214) !important;
    box-shadow:none !important;
    transform:none !important;
    opacity:1 !important;
}
body.nwseo-plugin-page :is(.nwseo-button-light,.nwseo-directory-button-light,.nwknowledge-button-light):hover {
    border-color:var(--nw-blue, #1457d9) !important;
    background:var(--nw-blue, #1457d9) !important;
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
}
