.kredo-compact { display: none; }

@media (max-width: 991px) {
    .header .kc-enabled > .container > .kc-legacy { display: none; }
    .header .kc-enabled.in {
        /* The theme caps the open Bootstrap menu at 340px. */
        max-height: calc(100vh - 70px) !important;
        max-height: calc(100dvh - 70px) !important;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }

    .header .kredo-compact {
        display: block;
        clear: both;
        padding: 8px 14px 10px;
        background: #fff;
        color: #222426;
        font: 400 15px/1.35 Arial, sans-serif;
    }
    .kredo-compact [hidden] { display: none !important; }
    .kredo-compact *, .kredo-compact *::before, .kredo-compact *::after { box-sizing: border-box; }
    .kredo-compact :is(a, button, input) { font: inherit; }
    .kredo-compact :is(a, button) { color: inherit; text-decoration: none; }
    .kredo-compact button { border: 0; border-radius: 0; background: none; text-align: start; cursor: pointer; }
    .kredo-compact :is(a, button):focus-visible { outline: 2px solid #222; outline-offset: -2px; }

    .kredo-compact .kc-search {
        display: flex;
        align-items: center;
        min-height: 46px;
        margin: 0 0 10px;
        border: 1px solid #dedfdf;
        border-radius: 7px;
        background: #f5f5f3;
    }
    .kredo-compact .kc-search:focus-within { outline: 2px solid #313437; outline-offset: -1px; }
    .kredo-compact .kc-submit {
        flex: 0 0 44px;
        min-height: 44px;
        position: relative;
        color: #555b60;
    }
    .kc-submit::before, .kc-submit::after { content: ''; position: absolute; }
    .kc-submit::before {
        top: 13px;
        left: 13px;
        width: 15px;
        height: 15px;
        border: 1.7px solid currentColor;
        border-radius: 50%;
    }
    .kc-submit::after { top: 28px; left: 25px; width: 8px; height: 1.7px; background: currentColor; transform: rotate(45deg); }
    .kredo-compact .kc-input {
        flex: 1;
        width: 100%;
        min-width: 0;
        height: 44px;
        padding: 0 10px 0 0;
        border: 0;
        outline: 0;
        box-shadow: none;
        background: transparent;
        color: #222426;
        font-size: 16px;
    }
    .kc-input::placeholder { color: #61666a; opacity: 1; }

    .kredo-compact :is(.kc-row, .kc-child, .kc-back) {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 44px;
        margin: 0;
        gap: 12px;
        padding: 8px 4px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .kredo-compact .kc-row {
        min-height: 49px;
        padding-block: 9px;
        border-bottom: 1px solid #e2e4e3;
    }
    .kc-label { display: block; color: #222426; font-size: 16px; font-weight: 600; }
    .kc-hint { display: block; margin-top: 3px; color: #606569; font-size: 13px; font-weight: 400; }
    .kc-row::after, .kc-child::after, .kc-back::before {
        content: '';
        flex: none;
        width: 7px;
        height: 7px;
        margin-inline: 5px;
        border: solid #62676a;
        border-width: 1.5px 1.5px 0 0;
        transform: rotate(45deg);
    }
    .kc-row[aria-expanded=false]::after { transform: rotate(135deg); }
    .kc-row[aria-expanded=true]::after { transform: rotate(-45deg); }
    .kc-panel { padding: 2px 8px 5px; background: #f5f5f3; border-inline-start: 3px solid #ffd221; }
    .kredo-compact .kc-all { font-weight: 600; }
    .kredo-compact .kc-back { justify-content: flex-start; width: auto; font-size: 14px; gap: 2px; }
    .kc-back::before { transform: rotate(-135deg); }
    .kredo-compact .kc-title { margin: 7px 0 12px; color: #222426; font: 700 21px/1.2 Arial,sans-serif; }
    .kredo-compact :is(.kc-detail,.kc-results) .kc-child { border-bottom: 1px solid #e2e4e3; }
    .kc-empty { margin: 8px 0 12px; }
    @media (hover: hover) {
        .kredo-compact :is(.kc-row,.kc-child,.kc-back):hover { color: #17191a; background: #f1f2ef; }
    }
    .header > .container:has(> .kc-toggle) {
        display: flex;
        align-items: center;
        column-gap: 8px;
        min-height: 67px;
    }
    .header > .container:has(> .kc-toggle)::before,
    .header > .container:has(> .kc-toggle)::after { display: none; }
    .header > .container:has(> .kc-toggle) > .pull-left {
        flex: 0 8 132px;
        min-width: 98px;
    }
    .header > .container:has(> .kc-toggle) .logo {
        display: block;
        min-width: 0;
    }
    .header > .container:has(> .kc-toggle) .logo img {
        max-width: 100%;
        object-fit: contain;
    }
    .header .sale_basket_small__mobile:has(+ .kc-toggle) {
        display: flex;
        align-items: center;
        flex: none;
        margin-inline-start: auto;
    }
    .header .sale_basket_small__mobile:has(+ .kc-toggle) :is(.sale_basket_small, .header_icon_favcomp_block) {
        margin-top: 0 !important;
        padding-top: 0;
    }
    .header.header-sticky .navbar-toggle.kc-toggle {
        display: inline-flex;
        flex: 0 1 6.4em;
        container: menu-toggle / inline-size;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        min-width: 44px;
        min-height: 44px;
        margin: 0;
        padding: 0 9px;
        /* The theme sets the navbar button colours and radius with !important. */
        color: #272727 !important;
        background: #fff !important;
        border: 1px solid #b8b8b5 !important;
        border-radius: 0 !important;
        font: 600 15px/1.2 Arial, sans-serif;
        white-space: nowrap;
    }
    .kc-toggle-icon {
        position: relative;
        width: 18px;
        height: 16px;
        flex: none;
    }
    .kc-toggle-icon::before, .kc-toggle-icon::after {
        content: '';
        position: absolute;
        inset: 7px 0 auto;
        height: 2px;
        background: currentColor;
    }
    .kc-toggle-icon::before {
        box-shadow: 0 -5px currentColor, 0 5px currentColor;
    }
    .kc-toggle[aria-expanded=true] .kc-toggle-icon::before {
        box-shadow: none;
        transform: rotate(45deg);
    }
    .kc-toggle[aria-expanded=true] .kc-toggle-icon::after {
        transform: rotate(-45deg);
    }
    .header.header-sticky .navbar-toggle.kc-toggle[aria-expanded=true],
    .header.header-sticky .navbar-toggle.kc-toggle:hover {
        border-color: #454541 !important;
    }
    .header.header-sticky .navbar-toggle.kc-toggle:focus-visible {
        outline: 2px solid #272727;
        outline-offset: 2px;
    }
    @media (max-width: 380px) {
        .header > .container:has(> .kc-toggle) { column-gap: 4px; padding-inline: 10px; }
        .header .sale_basket_small__mobile:has(+ .kc-toggle) :is(.header_icon_favcomp_item, .sale_basket_small) {
            margin-inline-start: 4px;
        }
    }
    /* A full basket and both counters can leave room only for the icon. */
    @container menu-toggle (max-width: 4.45em) {
        .kc-toggle-label {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip-path: inset(50%);
        }
    }
}
