/* --- Design tokens (ACCESSIBILITY_PLAN.md, Phase 0) ---
   Every text/background pair built from these meets WCAG 1.4.3 (4.5:1) and 1.4.11 (3:1)
   against white. The old brand blues (#08b2ff 2.4:1, #01A1DD 2.9:1) stay only as
   decorative/non-text accents (--color-accent). Use the tokens, not literal hex, for
   anything a user reads or focuses. */
:root {
    --color-primary: #0077b6;        /* filled buttons; 4.6:1 with white text */
    --color-primary-hover: #005f94;
    --color-brand-text: #0a6fa3;     /* headings, active tabs, links on white; 5.5:1 */
    --color-focus: #003DA5;          /* focus ring; 9.5:1 on white, 3:1+ on brand fills */
    --color-muted: #5a6570;          /* secondary text; 5.9:1 */
    --color-success: #1a7f1a;        /* delivered state; 5.1:1 */
    --color-danger: #b00020;
    --color-accent: #01A1DD;         /* decorative only — never text or focus */
}

html {
  font-size: 14px;
}
.page_header {
    margin-bottom: 1rem;
}

/* --- Focus visibility (WCAG 2.4.7) ---
   The vendored theme (main.min..orig.css) sets outline:0 on every button/input/select/
   textarea and only Bootstrap's .btn/.form-control restore one. This is the single
   replacement for every focusable element; hand-made rings elsewhere must use the same
   token. :where() keeps specificity at zero so component styles can still override it. */
:where(a, button, input, select, textarea, summary, [tabindex], [contenteditable]):focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}
/* The theme's `button:focus, input:focus, … { outline: 0 }` and `a:focus-visible
   { outline: 1px solid gray }` are (0,1,1) and beat the zero-specificity rule above, which
   left buttons, checkboxes and radios with no ring and links with a faint grey one
   (text inputs/selects only showed Bootstrap's .form-control shadow). Same specificity
   here, loaded after the theme, so it wins; class-based component rings
   (e.g. .view-switch__option:focus-visible) still override it. */
:is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}
/* Download-centre icon link: an inline <a> around a block <img> has no box of its own
   to draw the ring on, so give it one. */
.a-icon--download {
    display: inline-block;
    line-height: 0;
}
:where(tr, td, th)[tabindex]:focus-visible {
    outline-offset: -2px;
}
/* Skip link — visually hidden until focused (Bootstrap's .visually-hidden-focusable) */
.header-skip-link:focus-visible {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 20000;
    padding: 8px 14px;
    background: #fff;
    color: var(--color-focus);
    text-decoration: underline;
    font-weight: 600;
}

/* --- Reduced motion (WCAG 2.3.3) --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* `hidden` must always win over component display rules (badges, dropdowns, tour rows) */
[hidden] { display: none !important; }

/* --- Live regions / field errors (site.js announce(), setFieldError()) --- */
.a11y-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field-error {
    display: block;
    margin-top: 4px;
    font-size: .85rem;
    color: var(--color-danger);
}
[aria-invalid="true"] {
    border-color: var(--color-danger) !important;
}
/* Validation summary above a form (cart.js); focused when shown, links jump to the fields */
.error-summary {
    border: 2px solid var(--color-danger);
    border-radius: 4px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    background: #fff;
}
.error-summary__title { font-weight: 700; margin: 0 0 .25rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--color-danger); text-decoration: underline; }

/* Required-field marker and the note that explains it */
.required-marker { color: var(--color-danger); font-weight: 700; }
.form-required-note { font-size: .85rem; margin: .25rem 0 .5rem; }

/* Neutral help text under a field (e.g. the password rules), linked with aria-describedby */
.field-hint-muted { display: block; margin: 4px 0 0; font-size: .85rem; color: var(--color-muted); }

/* Non-error notice under a field (linked with aria-describedby by the page script) */
.field-hint {
    display: block;
    margin-top: 4px;
    font-size: .85rem;
    color: #7a5c00;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}
.loginpage-contactinfo {
    width: 100%;
    display: flex;
    justify-content: center;
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* The theme sets overflow-x:hidden on both html and body. That forces overflow-y:auto,
   so body becomes a nested scroll container, and mobile browsers then need two swipes
   to scroll the page. `clip` hides horizontal overflow without creating a scroll
   container. Fallback for browsers without clip support: keep hidden on html only. */
body { overflow-x: visible; }
@supports (overflow-x: clip) {
    html, body { overflow-x: clip; }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.page_header
 {
  color: var(--color-brand-text)

}
.gridstyle{
  color:black
}
.gridTable thead th a,
.gridTable thead th a:visited {
  color: black;
  text-decoration: underline;
}
.a-btn{
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    padding-right: 68px; /* room for the arrow circle: 4px inset + circle + gap */
}
.a-btn:hover,
.a-btn:focus-visible {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}
/* Arrow circle scales with the button: 4px from the outer edge (2px inside the 2px border),
   so a 60px button gets a 52px circle. No hover slide — at this inset it would overflow. */
.a-btn::after {
    content: '';
    position: absolute;
    display: block;
    top: 2px;
    right: 2px;
    height: calc(100% - 4px);
    width: auto;
    aspect-ratio: 1;
    margin-top: 0;
    background: url("/images/btn_arrow.png") no-repeat center / contain;
    opacity: 1;
    transition: opacity .3s;
}
.a-btn:hover::after { transform: none; }

@media only screen and (min-width: 1280px) {
    .o-header-top__inner-wrap {
        padding: 0 30px;
    }
}

.o-header-top__inner-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 0 15px;
    height: 100px;
}
.m-country-selector__icon {
    height: 40px !important;
}
/* --- Layout --- */
.o-header-bottom__inner-wrap {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    height: 36px;
    margin-right: 8px;
    vertical-align: middle;
}

.nav-logo_mobile {
    display: none;
}
.site-container {
    margin-top: 5px !important;
}

main {
    container-type: inline-size;
}

/* --- Nav utilities --- */

.cart-icon-wrap { 
    position: relative; 
    display: inline-block; 
    /* vertical-align: middle;  */
}

.reorder-icon-wrap { 
    position: relative; 
    display: inline-block; 
    /* vertical-align: middle;  */
    /* margin-right: 9px; */
}

.cart-badge {
    position: absolute; top: -7px; right: -10px;
    background: #dc3545; color: #fff;
    font-size: 10px; font-weight: bold; line-height: 1;
    padding: 2px 4px; border-radius: 8px; min-width: 16px; text-align: center;
}
.reorder-cart-badge {
    position: absolute; top: 2px; right: 0px;
    /* background: #dc3545; color: #fff;
    font-size: 10px; font-weight: bold; line-height: 1;
    padding: 2px 4px; border-radius: 8px; min-width: 16px; text-align: center; */
}
.cart-nav-link { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.reorder-cart-link { margin-left: 8px; }
.nav-disabled { color: #bbb; cursor: not-allowed; pointer-events: none; }

/* --- Shared: Quantity stepper --- */

.qty-wrapper {
    display: inline-flex;
    align-items: center;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover { background: #e8f0fe; }

.qty-minus { border-radius: 4px 0 0 4px; border-right: none; }
.qty-plus  { border-radius: 0 4px 4px 0; border-left: none; }

.qty-input {
    width: 30px;
    text-align: center;
    padding: 2px 4px;
    border: 1px solid #ccc;
    height: 28px;
    box-sizing: border-box;
    border-radius: 0;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Brand button variants (base .a-btn comes from main css, overridden above) --- */

a.a-btn { text-decoration: none; }

/* Compact variant for in-grid and toolbar actions */
.a-btn--sm {
    padding: 4px 14px;
    font-size: 12px;
    letter-spacing: .5px;
    max-height: none;
    line-height: 16px;
}

.a-btn--sm::after { content: none; }

/* Opt-in arrow circle on a compact button (forward actions: Kjøp, Bruk på alle). The circle
   scales with the height like on .a-btn, ~20px here; disabled hides it as on the full size. */
.a-btn--sm.a-btn--arrow { padding-right: 30px; }
.a-btn--sm.a-btn--arrow:not([disabled])::after { content: ''; }
/* Arrow pointing down — the action adds to the list below (BoardOrders "Legg til") */
.a-btn--arrow-down::after,
.a-btn--arrow-down:hover::after { transform: rotate(90deg); }

/* Outline variant keeps brand border but transparent background */
.a-btn--outline,
.a-btn--outline:hover,
.a-btn--outline:focus-visible {
    background: transparent;
    color: var(--color-focus);
    border-color: var(--color-focus);
}

.a-btn--outline:hover { background: rgba(0, 61, 165, 0.08); }

.a-btn--outline::after { content: none; }

/* Quiet destructive variant for row-level delete buttons */
.a-btn--ghost-danger {
    background: transparent;
    border-color: transparent;
    color: #6c757d;
    text-transform: none;
    font-weight: 400;
}

.a-btn--ghost-danger:hover {
    background: #fee;
    border-color: transparent;
    color: #dc3545;
}

.a-btn--ghost-danger::after { content: none; }

/* --- Toast notifications --- */

.app-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(420px, calc(100vw - 32px));
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 4px;
    border-left: 4px solid #0dcaf0;
    background: #fff;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    font-size: 14px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .3s, transform .3s;
}

.app-toast--visible {
    opacity: 1;
    transform: none;
}

.app-toast--success { border-left-color: #198754; }
.app-toast--error   { border-left-color: #dc3545; }
.app-toast--warning { border-left-color: #ffc107; }

/* Placed next to the button that triggered it; left/top are set by showToast() in site.js */
.app-toast--anchored {
    position: fixed;
    z-index: 11000;
    width: max-content;
    max-width: min(360px, calc(100vw - 32px));
}

.app-toast__text { flex: 1; }

.app-toast__close {
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    color: #6c757d;
}

/* --- Product overlay extras (moved from inline styles in site.js) --- */

.overlay-pdf-thumb { cursor: pointer; }

.overlay-boardcode-link {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
}

/* --- Status page search field --- */

.status-search-input {
    width: 200px;
    height: 35px;
}

@media (max-width: 768px) {
    .status-search-input { width: 130px; }
}

/* --- Empty state for list pages --- */

.empty-state {
    padding: 24px 12px;
    text-align: center;
    color: #6c757d;
}

/* --- DSV status row in admin menu --- */

.dsv-status-item {
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.dsv-status-anchor {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    color: #555;
    cursor: default;
}

.dsv-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dsv-status-dot--ok { background: #198754; }
.dsv-status-dot--error { background: #dc3545; }

/* --- Shared: Product number/description layout --- */

.product_number, .product_description {
    display: block;
    text-overflow: ellipsis;
}

@media (min-width: 1200px) {
    .product_number, .product_description {
        display: inline;
    }
    .product_number::after {
        content: "\00a0";
    }
}

/* --- Shared: Filter / dropdown utilities --- */

.dropdown_label {
    font-weight: 600;
}

.filter-group {
    margin-top: 2em;
}

/* --- Shared: ship-to picker (native select; Order, DeliveryReport) --- */

.shipto-select {
    display: block;
    width: 400px;
    max-width: 100%;
    min-height: 44px;
}

@media (max-width: 1023px) {
    .shipto-select { width: 100%; }
    .reorder-overlay .product_number,
    .reorder-overlay .product_description {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .reorder-icon-wrap { 
    bottom:5px;
    margin-right: 9px;
}

}

/* --- Shared: Home / Contact page layout --- */

.home-layout {
    display: flex;
    align-items: center;
    gap: 40px;
}

.home-image {
    flex: 0 0 auto;
    height: 100%;
    max-height: 280px !important;
    align-content: center;
    display: none;
}

.home-image img {
    max-width: 250px;
    height: auto;
}

.home-text {
    flex: 1;
    font-size: 0.9rem !important;
    width: auto;/*fit-content;*/
}

h2.home-text {
    font-size: 1.1rem !important;
    margin-top: 0;
}

h3.home-text {
    font-size: 1.0rem !important;
    margin-top: 0;
}

.home-content p {
    margin-top: 0.15em;
    margin-bottom: 0.15em;
}

.home-content-wrapper {
    position: relative;
}

.home-content-fade {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    /* background: linear-gradient(transparent, #fff); */
    /* background: linear-gradient(to bottom, rgba(0, 0, 0, 0), white 150%); */
     pointer-events: none;
}

.home-content-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100% !important;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 16px;
    font-size: 1.1rem !important;
    font-weight: 600;
    text-transform: uppercase;
}

.home-toggle-icon {
    flex-shrink: 0;
}

.home-toggle-icon g {
    stroke: #fff;
    stroke-width: 1.5;
}

.home-content-wrapper.expanded .home-toggle-vertical {
    display: none;
}

.home-left {
    flex: 0 0 260px;
}

.home-content-toggle:hover {
    background: #0052a3;
}

.m-tab-content {
    background-color: white;
}

.wrap-grey, .contact-cards {
    font-size: 0.9rem !important;
    background-color: rgb(240, 240, 240);
    border: 1.65px solid rgb(222, 223, 224);
    border-radius: 8px;
    padding: 0 0;
}

.contact-cards {
    margin-top: 10px;
    background-color: rgb(240, 240, 240);
}

a.plaintext {
    font-weight: 700 !important;
    text-decoration: none;
    color: #333;
}

.m-teaser-five {
    text-align: center;
}
/* The teaser link wraps block content (title, image, text); as an inline <a> it has no
   box of its own for the focus ring, so make it one. Ring drawn inside the grey card. */
.m-teaser-five > a {
    display: block;
}
.m-teaser-five > a:focus-visible {
    outline-offset: -3px;
}

.m-teaser-five__title {
    font-size: 0.8rem !important;
    padding: 0;
    margin-top: 5px;
    text-decoration: none;
    color: #333;
    letter-spacing: normal;
    font-weight: 500 !important;
}

.m-teaser-five__text {
    margin: 0;
    margin-bottom: 5px;
    padding: 0;
    letter-spacing: normal;
    font-size: 0.8rem !important;
}

.contact-card-title {
    font-size: 0.8rem !important;
}

.m-tab-content--mobile {
    display: none;
    padding: 0;
}

.contact-cards-mobile {
    display: none;
}

.contact-cards h2,
.contact-cards h3 {
    padding: 8px 0;
    margin-bottom: 0;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    color: #333;
    width: 100%;
    text-align: center;
}
.home-text-wrapper {
    display: flex;
    flex-direction: column;
    padding-top: 1em;
    width: 100%;
    margin:auto;
}
.hidden {
    display:none;
}
/* Two-class selectors so these beat the theme's `.m-tab-content ul` / `ul > li` list styling
   (margin 0, padding-left 17px + padding-bottom 20px, chevron ::after) — Home wraps the cards in .m-tab-content. */
.contact-cards .contact-cards-grid {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    padding-bottom: 0.7em;
    width: 100%;
    margin:auto;
}

.contact-cards-grid > .contact-card {
    position: static;
    font-size: inherit;
    font-weight: inherit;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    min-width: 85%;
    max-width: 95%;
    margin: 5px auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    text-align: center;
}
.contact-cards-grid > .contact-card::after {
    content: none;
}

/* .wrap-grey {
    display: flex;
    flex-flow: row wrap;
    padding: 0;
    margin: 0 auto;
    list-style: none;
    background: none;
    padding: 0 5px;
} */
.contact-card-name {
    font-weight: 500;
    font-size: 0.9rem !important;
    margin-bottom: 0;
}

.contact-card-title {
    color: #666;
    font-size: 0.8rem !important;
    margin-bottom: 6px;
}

.contact-card-detail {
    font-size: 0.8rem !important;
    margin-bottom: 2px;
    margin-right: 5px;    
}

.contact-label {
    font-size: 0.8rem !important;
    color: #666;
}

.contact-card-detail a {
    color: #0066cc;
    text-decoration: none;
}

.contact-phone-link {
    color: var(--color-brand-text);
    text-decoration: none;
}

a[href^="tel:"].contact-phone-link::before {
    content: '';
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    background: url('/images/phone_blue.svg') no-repeat center / contain;
    /* margin-right: 5px; */
    vertical-align: middle;
}
.m-teaser-five.hover_white:hover{
  background-color: #ddd !important;
  font-size: 18px;
}

.contact-card-detail a:hover {
    text-decoration: underline;
}

.m-teaser-five__img {
    display: block;
    margin: 5px auto 15px auto;
    max-width: 80%;
    padding: 0 10px;
}

.m-teaser-five:hover img {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

.contact-card-detail-horizontal {
    display:flex;
    flex-direction: row;
    justify-content: center;
}
/* .hover_1_2 {
    width:50%;
} */

.hover_1_2:hover {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

@media (max-width: 1200px) {
    .home-image img {
        max-width: 200px !important;
        height: auto;
    }
}

@media only screen and (max-width: 1023px) {
    .m-teaser-five {
        display: block;
    }
}

@media (max-width: 768px) {

    .nav-logo {
        display: none;
    }
    .nav-logo_mobile {
        display: inline;
        /*transform: scale(0.4);*/
        /* width:30px; */
        height: 30px;
    }
    .home-layout { flex-direction: column; }
    .home-left { display: none; }
    .contact-cards-mobile { display: block; }
    .m-tab-content--mobile { display: block; }
    .m-teaser-five__title, .m-teaser-five__text, .m-teaser-five__img {
        padding: 0 !important;
    }

    .home-content.collapsed {
        max-height: var(--content-max-height, 900px);
        overflow: hidden;
    }
    a[href^="tel:"].contact-phone-link::before {
        width: 1.5em;
        height: 1.5em;    
    }
}

@media screen and (min-width: 1024px) {
    .home-image { display: block !important; }
}

@media screen and (max-width: 500px) {
    .container.nav-header {
        padding:5px 0;
    }
    .home-content-wrapper {
        margin-top:15px;
    }
    .page_header {
        font-size: calc(1rem + .9vw);
        height:25px;
        margin-top:5px;
        padding-top:5px;
        margin-bottom: 0;
    }
    .contact-cards h2,
    .contact-cards h3 {
        font-size: 1rem !important; 
    }
    .m-teaser-five__title {
        font-size: 1rem !important;
        font-weight: 600 !important;

    }
    .m-teaser-five__text {
        font-size: 1rem !important;
    }
    .notification-dropdown {
        width: 100%;
        max-height: 420px;
    }
}

/* --- Notification bell --- */
.notification-icon-wrap {
    position: relative;
    display: inline-block;
}

.notification-bell-wrap {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 500px;
    max-height: 420px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1050;
    overflow: hidden;
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.notification-dropdown-header a {
    font-size: 0.8rem;
}

.notification-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
}

.notification-dropdown-footer {
    padding: 8px 14px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.85rem;
}

.notif-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.notif-item .notif-content { flex: 1; min-width: 0; }

.notif-item:hover { background: #f8f9fa; }
.notif-item.unread { background: #e8f4ff; font-weight: 500; }
.notif-item .notif-time { color: var(--color-muted); font-size: 0.75rem; margin-top: 2px; }
.notif-item .notif-type-icon { margin-right: 6px; }
.notif-goto {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.15s;
}
.notif-goto:hover { background: #dc3545; color: #fff; }
.notif-list { list-style: none; margin: 0; padding: 0; }
/* "Mark as read" — a real button so keyboard users can do what a click on the row does */
.notif-mark {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    color: var(--color-brand-text);
    cursor: pointer;
    line-height: 1;
}
.notif-mark:hover { background: #e8f0fe; }
/* --- Notification settings modal --- */
.notif-settings-panel {
    max-width: 400px;
}

.notif-settings-body {
    padding: 16px;
}

/* --- Impersonation --- */
.impersonation-form-inline {
    display: inline;
}

/* --- Chat panel body --- */
#chatPanelBody {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-empty { padding: 20px; text-align: center; color: var(--color-muted); }
.notif-details { font-size: 0.78rem; color: #555; margin-top: 3px; }
.notif-detail-label { color: var(--color-muted); }

.data-row.highlight-row { background: #fff3cd !important; transition: background 2s ease; }

@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 12px 12px 0 0;
    }
}

/* Area switcher */
.area-switcher-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
    background: white;
    height: 30px!important;
    /* border-bottom: 1px solid rgba(0, 32, 91, 0.14); */
}

.area-switcher-btn {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #00205b;
    border-color: rgba(0, 32, 91, 0.35);
    padding: 2px 12px!important;
    background: transparent;
    height: 25px;
}
.area-switcher-dropdown-wrapper {
    height: 25px!important;
}
.area-switcher-btn:hover,
.area-switcher-btn:focus {
    background: rgba(0, 32, 91, 0.1);
    color: #00205b;
    border-color: #00205b;
}

.area-switcher-bar .dropdown-menu {
    min-width: 180px;
    font-size: 0.85rem;
}

/* ── Feedback widget ──────────────────────────────────────────
   Mirrors .chat-fab in chat.css but anchored left, so both can be
   on screen at once when Chat:Enabled is true. */

.feedback-fab {
    position: fixed;
    bottom: 24px;
    left: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5a6570;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.feedback-fab:hover {
    transform: scale(1.08);
    background: var(--color-primary);
}

.feedback-fab svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.feedback-panel {
    max-width: 520px;
}

.feedback-body {
    padding: 1rem 1.25rem 1.25rem;
}

.feedback-intro {
    font-size: 0.9rem;
    color: #5a6570;
    margin-bottom: 1rem;
}

.feedback-context-note {
    font-size: 0.78rem;
    color: var(--color-muted);
    word-break: break-all;
    margin-bottom: 1rem;
}

.feedback-actions {
    display: flex;
    gap: 0.5rem;
}

/* Tabs: "Meld feil" / "Gi vurdering". Only rendered when a rating prompt is active. */

.feedback-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid #e3e6e9;
}

.feedback-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.6rem 0.9rem;
    font-size: 0.92rem;
    color: #5a6570;
    cursor: pointer;
    min-height: 44px;
}

.feedback-tab:hover {
    color: var(--color-brand-text);
}

.feedback-tab.is-active {
    color: var(--color-brand-text);
    border-bottom-color: var(--color-brand-text);
    font-weight: 600;
}

/* ── Star rating ──────────────────────────────────────────────
   Native radios, visually replaced by the star labels. The inputs keep their
   size and stay in the layout (opacity, not display:none) so they remain
   focusable and reachable by arrow keys; the label sits on top of them. */

.star-rating {
    border: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
}

.star-rating__question {
    float: none;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3339;
    margin-bottom: 0.75rem;
}

.star-rating__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.star-rating__label {
    cursor: pointer;
    padding: 0.25rem;
    line-height: 0;
    border-radius: 4px;
}

.star-rating__icon {
    width: 34px;
    height: 34px;
    fill: #d6dade;
    transition: fill 0.12s, transform 0.12s;
}

.star-rating__label:hover .star-rating__icon {
    transform: scale(1.08);
}

/* Selected: fill this star and every star before it. */
.star-rating[data-value="1"] .star-rating__label:nth-of-type(-n+1) .star-rating__icon,
.star-rating[data-value="2"] .star-rating__label:nth-of-type(-n+2) .star-rating__icon,
.star-rating[data-value="3"] .star-rating__label:nth-of-type(-n+3) .star-rating__icon,
.star-rating[data-value="4"] .star-rating__label:nth-of-type(-n+4) .star-rating__icon,
.star-rating[data-value="5"] .star-rating__label:nth-of-type(-n+5) .star-rating__icon {
    fill: #f0a500;
}

/* Hover preview replaces the selection while the pointer is on the control: clear
   every star first, then fill up to the hovered one, so the preview reads as "three
   stars" rather than three bright plus two leftovers from the current selection.
   The :nth-of-type(n) in the clearing rule is there to match the specificity of the
   [data-value] rules above — without it they would win and nothing would clear. */
.star-rating[data-hover] .star-rating__label:nth-of-type(n) .star-rating__icon {
    fill: #d6dade;
}

.star-rating[data-hover="1"] .star-rating__label:nth-of-type(-n+1) .star-rating__icon,
.star-rating[data-hover="2"] .star-rating__label:nth-of-type(-n+2) .star-rating__icon,
.star-rating[data-hover="3"] .star-rating__label:nth-of-type(-n+3) .star-rating__icon,
.star-rating[data-hover="4"] .star-rating__label:nth-of-type(-n+4) .star-rating__icon,
.star-rating[data-hover="5"] .star-rating__label:nth-of-type(-n+5) .star-rating__icon {
    fill: #ffc233;
}

/* Keyboard focus has to be visible on the label, since the input itself is invisible. */
.star-rating__input:focus-visible + .star-rating__label {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.star-rating__value {
    font-size: 0.88rem;
    color: #5a6570;
    min-height: 1.3em;
    margin-bottom: 1rem;
}

/* ── Inline rating prompt ─────────────────────────────────────
   A bar at the end of the page, not a modal: it covers nothing, traps no focus
   and is trivially ignored. Deliberately quieter than the feedback FAB — it
   appears uninvited, so it has to be easy to skip. */

.rating-bar {
    margin: 2rem auto 1.5rem;
    max-width: 720px;
    padding: 1rem 1.25rem;
    background: #f7f9fa;
    border: 1px solid #e3e6e9;
    border-radius: 8px;
}

.rating-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

/* The script toggles these with the hidden attribute, and a display rule beats the
   browser's [hidden] default — without this the flex row would stay on screen. */
.rating-bar [hidden] {
    display: none !important;
}

.rating-bar__stars {
    margin: 0;
}

.rating-bar__stars .star-rating__question {
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.rating-bar__actions {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.rating-bar__value {
    margin: 0.5rem 0 0;
}

.rating-bar__thanks-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3339;
    margin-bottom: 0.75rem;
}

.rating-bar__comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (max-width: 665px) {
    .rating-bar {
        margin: 1.5rem 1rem;
        padding: 1rem;
    }

    .rating-bar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .rating-bar__actions .a-btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 665px) {
    .star-rating__label {
        padding: 0.4rem;
    }

    .star-rating__icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 576px) {
    .feedback-fab {
        width: 42px;
        height: 42px;
        bottom: 16px;
        left: 16px;
    }
}

/* --- In-page tab strip (Admin/Satisfaction tabs, Products view switch) ---
   Links carrying the page state, with aria-current="page" on the active one. */
.page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid #e3e6e9;
    margin-bottom: 1rem;
}

.page-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    min-height: 44px;
    color: #5a6570;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.page-tab:hover {
    color: var(--color-brand-text);
}

.page-tab.is-active {
    color: var(--color-brand-text);
    border-bottom-color: var(--color-brand-text);
    font-weight: 600;
}

/* --- Loading spinner (reorder panel, guided tour) --- */
.app-spinner-wrap {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.app-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #ccc;
    border-top-color: #5a9aab;
    border-radius: 50%;
    animation: app-spin 0.7s linear infinite;
}

.app-spinner--sm {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

@keyframes app-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .app-spinner { animation-duration: 2s; }
}

/* --- Guided tour "?" FAB (starts the current page's tour) ---------------------------
   Sibling of .feedback-fab: same size, colour and shadow. Desktop (≥1024px): fixed at the
   top-left gutter, level with the page header — tour.js measures the header (area-switcher
   bar and impersonation banner included) into --tour-help-top. Below that it stacks right
   above the feedback FAB, so the two "help" controls sit together. */
.tour-help {
    position: absolute;
    /* left: 24px; */
    right:calc(8vw);
    top: 124px;                 /* feedback FAB: bottom 24 + 48 high + 12 gap */
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--color-brand-text);
    border-radius: 50%;
    background: transparent; /*  #5a6570; */
    color: var(--color-brand-text); /* #fff;*/
    cursor: pointer;
    /* box-shadow: 0 4px 16px rgba(0,0,0,0.2); */
    z-index: 2;                /* above page content, below every overlay/drawer (≥ 1000) */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.tour-help[hidden] { display: none; }

/* Stroke-only icon: the theme's global `svg { fill: #000 }` (main.min..orig.css) would
   otherwise fill the open arc of the "?" with a black blob. */
.tour-help svg {
    fill: none;
    stroke: currentColor;
}

.tour-help:hover,
.tour-help:focus-visible {
    transform: scale(1.08);
    /* background: #01A1DD; */
}

.tour-help:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

@media (max-width: 1024px) {
    .tour-help {
        /* bottom: auto; */
        right:calc(5vw);
        /* top: var(--tour-help-top, 112px); */
    }
}

@media (min-width: 1500px) {
    .tour-help {
        right:calc(9vw);
        /* top: var(--tour-help-top, 112px); */
    }
}

@media (min-width: 2200px) {
    .tour-help {
        right:calc(12vw);
        /* top: var(--tour-help-top, 112px); */
    }
}
@media (max-width: 576px) {
    .tour-help {
        width: 24px;
        height: 24px;
        /* left: 16px; */
        top:105px;
        right:calc(5vw);
        bottom: 70px;             /* feedback FAB at 576px: bottom 16 + 42 high + 12 gap */
    }
}

/* --- Guided tour popover (Driver.js theme overrides; wwwroot/js/tour.js) --- */
.driver-popover.tour-popover {
    max-width: min(360px, calc(100vw - 2rem));
    padding: 18px 20px 16px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.tour-popover .driver-popover-title {
    font-size: 17px;
    padding-right: 28px;
}

.tour-popover .driver-popover-description {
    font-size: 14px;
    color: #333;
}

.tour-popover .driver-popover-close-btn {
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    font-size: 22px;
    color: #666;
}

/* driver.css sets `all: unset` on this button (zero-specificity outline removal beats the
   global :focus-visible rule in this file) — give it its own ring, same as the footer
   buttons below (WCAG 2.4.7). */
.tour-popover .driver-popover-close-btn:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.tour-popover .driver-popover-footer {
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.tour-popover .driver-popover-navigation-btns {
    gap: 6px;
}

.tour-popover .driver-popover-navigation-btns button + button { margin-left: 0; }

.tour-popover .driver-popover-footer button {
    padding: 6px 14px;
    min-height: 34px;
    font-size: 13px;
    font-weight: 500;
    text-shadow: none;
    border-radius: 4px;
    border: 1px solid var(--color-primary);
    color: #0a6fa3;
    background: #fff;
}

.tour-popover .driver-popover-footer button:hover,
.tour-popover .driver-popover-footer button:focus-visible {
    background: #eaf7ff;
}

.tour-popover .driver-popover-footer button:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.tour-popover .driver-popover-next-btn {
    background: var(--color-primary);
    color: #fff;
}

/* tour.js focuses Next on every step so Enter advances the tour. Browsers hide
   :focus-visible for programmatic focus right after a mouse click (the "?" button on
   step 1), so the ring is tied to plain :focus here — it is the cue that Enter works.
   The background stays put on hover/focus: after a mouse click the cursor rests on the
   next card's button, and a darker shade there read as a stuck "pressed" state. The
   extra specificity beats the generic footer :focus-visible rule above. */
.tour-popover .driver-popover-footer button.driver-popover-next-btn:hover,
.tour-popover .driver-popover-footer button.driver-popover-next-btn:focus,
.tour-popover .driver-popover-footer button.driver-popover-next-btn:focus-visible {
    background: #e8f4f9;
    
    /* color: #fff; */
}

.tour-popover .driver-popover-footer button.driver-popover-next-btn:focus {
    outline: 2px solid #0a6fa3;
    outline-offset: 2px;
}

.tour-popover .tour-popover__skip {
    border-color: transparent;
    color: #555;
    margin-right: auto;
}

/* Waiting for a client-rendered target: spinner + status under the text */
.tour-popover .tour-popover__wait {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
}

.tour-popover--waiting .tour-popover__wait,
.tour-popover--failed .tour-popover__wait { display: flex; }

.tour-popover--failed .tour-popover__wait .app-spinner { display: none; }
.tour-popover--failed .tour-popover__status { color: #a33; }

/* A step's second element (`also` in TourCatalog): tour.js lays an inert copy over Driver's
   overlay at the original's position, padded like Driver's cut-out, so it reads as a second
   highlight. left/top are set by tour.js. */
.tour-also {
    position: fixed;
    z-index: 10001;            /* above .driver-overlay (10000), below the popover */
    padding: 6px;              /* = STAGE_PADDING in tour.js */
    border-radius: 6px;
    background: #fff;
    pointer-events: none;
}

/* Example row / block: shown only while a tour runs on an empty grid */
.tour-example-row[hidden],
.tour-example-block[hidden] { display: none !important; }

.tour-example-row td,
.tour-example-row + .detail-row .detail-value {
    color: #6b6b6b;
    font-style: italic;
}

.tour-example-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 3px;
    background: #fff3cd;
    color: #7a5c00;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

@media (max-width: 665px) {
    .tour-popover .driver-popover-footer button { min-height: 44px; padding: 8px 16px; }
    .tour-popover .driver-popover-close-btn { width: 44px; height: 44px; top: 0; right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .driver-fade .driver-overlay,
    .driver-fade .driver-popover { animation: none; }
}
