/* Search popup, design A (1 Nov 2026). Loaded only with body.ms-search-a.
   Selectors are deliberately specific: the older popup rules in style.css,
   the mobile CSS files and the footer hotfix all use !important. */

/* ---------- Result rows (all screens) ---------- */
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline{
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 0 8px !important;
    padding: 0 16px !important;
    background: #fff !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline:has(div.aws_result_tag)::before{
    content: "Kategorier";
    flex: 0 0 100%;
    padding: 14px 0 9px;
    color: #6b7b80;
    font: 700 12px/1 Inter, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item:not(.aws_result_tag){
    flex: 0 0 calc(100% + 32px) !important;
    width: calc(100% + 32px) !important;
    margin: 0 -16px !important;
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    grid-template-areas: "image title price" "image stock price" !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 4px !important;
    min-height: 0 !important;
    padding: 10px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf0f1 !important;
    border-radius: 0 !important;
    background: #fff !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_tag + div.aws_result_item:not(.aws_result_tag){
    grid-template-areas: "label label label" "image title price" "image stock price" !important;
    grid-template-rows: auto auto auto !important;
    margin-top: 6px !important;
    padding-top: 0 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_tag + div.aws_result_item:not(.aws_result_tag)::before{
    content: "Produkter";
    grid-area: label;
    margin: 0 -16px 0;
    padding: 12px 16px 9px;
    border-top: 1px solid #edf0f1;
    background: #fff;
    color: #6b7b80;
    font: 700 12px/1 Inter, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item:not(.aws_result_tag):hover,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.hovered:not(.aws_result_tag){
    background: #f4f8f8 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_content,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_head{
    display: contents !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_image{
    grid-area: image !important;
    width: 58px !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #f6f8f8 !important;
    overflow: hidden !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_image img{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_title{
    grid-area: title !important;
    align-self: end !important;
    margin: 0 !important;
    color: #16262a !important;
    font: 600 14.5px/1.3 Inter, sans-serif !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_title strong{
    color: #1f6f63 !important;
    font-weight: 800 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock{
    grid-area: stock !important;
    align-self: start !important;
    justify-self: start !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    color: #1b7a3e !important;
    font: 600 12px/1.2 Inter, sans-serif !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock::before{
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22a05a;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock.ms-few,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock.ms-bems{
    color: #a45d00 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock.ms-few::before,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock.ms-bems::before{
    background: #f0a020;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock.out{
    color: #b42318 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_stock.out::before{
    background: #d92d20;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_price{
    grid-area: price !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 2px !important;
    margin: 0 !important;
    color: #16262a !important;
    font: 800 15px/1.15 Inter, sans-serif !important;
    white-space: nowrap !important;
    text-align: right !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_price del{
    order: 1 !important;
    color: #6b7b80 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_price ins{
    order: 2 !important;
    text-decoration: none !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_price .ms-savings{
    order: 3 !important;
    font-size: 10.5px !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_result_sale{
    top: 6px !important;
    left: 10px !important;
    right: auto !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item span.aws_onsale{
    font-size: 9.5px !important;
    padding: 3px 6px !important;
}

/* ---------- Category shortcuts ---------- */
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag{
    position: relative !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 0 8px !important;
    padding: 8px 13px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #eef4f3 !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag:hover,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag.hovered{
    background: #dde9e7 !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag span.aws_result_tax_title{
    color: #214249 !important;
    font: 600 14px/1.2 Inter, sans-serif !important;
    white-space: nowrap !important;
}
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag span.aws_result_count,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag span.aws_result_hierarchy,
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_item.aws_result_tag span.aws_result_excerpt{
    display: none !important;
}

/* ---------- "Se alle resultater" ---------- */
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline a.ms-search-more{
    flex: 0 0 100% !important;
    width: 100% !important;
    min-height: 50px !important;
    margin: 12px 0 14px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
}

/* ---------- Phones and tablets: one "Luk" button, search icon in the field ---------- */
@media (max-width: 1199px){
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .aws-search-form{
        height: 48px !important;
    }
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .aws-search-field{
        height: 48px !important;
        line-height: 48px !important;
        padding: 0 14px 0 44px !important;
        border: 2px solid #214249 !important;
        border-radius: 14px !important;
        background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23214249' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 14px 50% !important;
        font-size: 16px !important;
        color: #16262a !important;
    }
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .aws-search-form .aws-search-clear,
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .aws-search-form .aws-search-btn,
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .aws-search-form .aws-form-btn{
        display: none !important;
    }
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .ms-search-dismiss{
        width: auto !important;
        height: 44px !important;
        flex: 0 0 auto !important;
        padding: 0 4px !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: none !important;
        color: #214249 !important;
        font: 600 15px/1 Inter, sans-serif !important;
    }
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .ms-search-dismiss span{
        display: none !important;
    }
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .ms-search-dismiss::after{
        content: "Luk";
    }
}

/* ---------- Phones: one white sheet ---------- */
@media (max-width: 767px){
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .ms-search-backdrop{
        background: #fff !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    html body.ms-search-a.ms-search-open .ms-search-shell.is-open[data-ms-search-shell] .ms-search-panel[data-ms-search-panel]{
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        transform: none !important;
        gap: 10px !important;
        padding: 12px 14px 10px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    html body.ms-search-a.ms-search-open div.aws-search-result{
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
}

/* The video bubble sits above everything; hide it while the search is open. */
html body.ms-search-a.ms-search-open iframe[data-cg-launcher-bubble-size]{
    visibility: hidden !important;
    pointer-events: none !important;
}

/* "Intet fundet" is a plain line, not a product row (AWS renders it as a span). */
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline .aws_no_result{
    flex: 0 0 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 22px 0 6px !important;
    border: 0 !important;
    grid-template-columns: none !important;
    color: #16262a !important;
    font: 500 15px/1.4 Inter, sans-serif !important;
    text-align: center !important;
}

/* First product under the "Produkter" heading: keep the sale badge on the photo. */
html body.ms-search-a.ms-search-open div.aws-search-result div.aws_results.style-inline div.aws_result_tag + div.aws_result_item:not(.aws_result_tag) span.aws_result_sale{
    top: 39px !important;
}
