/*
 * Shop header search: always visible (like the live shop) instead of opening from the search icon.
 *  - lg (1024px) and up: inline between the logo and the icons
 *  - below lg: full-width row under the logo/icons row
 * Plain CSS on purpose, so no Tailwind rebuild is needed.
 */
#header .gp-header-search {
    position: relative;
    display: block !important; /* x-show would otherwise hide it until the icon is clicked */
    border: 0;
    box-shadow: none;
    background: transparent;
    z-index: auto;
}
#header .gp-header-search .container {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
}
#header .gp-header-search form {
    display: flex;
    width: 100%;
}
/* search field text: dark on white, placeholder always visible */
#header .gp-header-search input[type="search"] {
    background: #fff;
    color: #222;
}
#header .gp-header-search input[type="search"]::placeholder {
    color: #6b7280;
    opacity: 1;
}
/* suggestions overlay the page instead of growing the header */
#header .gp-header-search nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
}
/* the toggle icon is no longer needed */
#header #menu-search-icon {
    display: none;
}

/* below lg: own full-width row after the logo / icons */
@media (max-width: 1023px) {
    #header .gp-header-search {
        order: 2;
        flex: 0 0 100%;
        width: 100%;
        margin: .5rem 0 0;
    }
}

/* lg and up: between logo and icons */
@media (min-width: 1024px) {
    #header .gp-header-search {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: 42rem;
        margin: 0 1.5rem;
    }
}

/*
 * Header like the live shop: taller search field with a bigger "Suche" button, a shorter search bar,
 * and bigger account / cart / quote icons (with labels from md up) that sit right next to the search bar.
 */
#header .gp-header-search input[type="search"] {
    height: 50px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 16px;
    border-radius: 3px 0 0 3px;
}
#header .gp-header-search button.gp-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 50px;
    min-width: 50px;
    padding: 0 1em;
    font-size: 16px;
    font-weight: 300;
    border-radius: 0 3px 3px 0;
}
#header .gp-search-btn__label {
    display: none;
}

/* account / cart link: image icon + label + sub label */
#header .gp-user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    text-align: left;
    color: #fff;
}
#header .gp-user-link__icon {
    display: block;
    width: auto;
    height: auto;
    max-height: 30px;
    flex: 0 0 auto;
}
#header .gp-user-link__text {
    display: none;
    flex-direction: column;
    line-height: 1.4;
}
#header .gp-user-link__label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}
#header .gp-user-link__sub {
    font-size: 14px;
    font-weight: 300;
    white-space: nowrap;
}
#header .gp-quote-link__icon {
    width: 30px;
    height: 30px;
    background-size: 43px 43px;
    background-position: -5px -7px;
}

@media (min-width: 768px) {
    #header .gp-user-link__text {
        display: flex;
    }
    #header .gp-user-link__icon--account {
        max-height: 38px;
    }
    #header .gp-user-link__icon--cart {
        max-height: 45px;
    }
    #header .gp-quote-link__icon {
        width: 46px;
        height: 46px;
        background-size: 66px 66px;
        background-position: -8px -10px;
    }
}

/* lg and up: the word "Suche" on the button, shorter search bar, icons next to it */
@media (min-width: 1024px) {
    #header .gp-header-search {
        flex: 0 1 27.5rem;
        max-width: 27.5rem;
        margin: 0 1.5rem 0 2rem;
    }
    #header .gp-header-search button.gp-search-btn {
        min-width: 130px;
    }
    #header .gp-search-btn__label {
        display: inline;
    }
}
@media (min-width: 1024px) {
    #header > .container {
        justify-content: center;
    }
}
/* the Ctrl+K hint is not on the live shop and would cover the placeholder of the shorter field */
#header .gp-header-search kbd {
    display: none;
}

/* lg and up: logo on the left edge, icons on the right edge of the container, the search bar (fixed width)
   centred in the space between them */
@media (min-width: 1024px) {
    #header .gp-header-search {
        margin-left: auto;
        margin-right: auto;
    }
    #header .gp-header-icons {
        margin-right: 0;
    }
}

/* wide screens: more space between the main menu items so the menu fills the header corridor further to the right */
@media (min-width: 96rem) {
    #header nav[aria-label^="Hauptmen"] > ul {
        column-gap: 1.75rem;
    }
}

/* ---------- mini cart: dropdown under the cart icon (instead of the sidebar), like the live shop ---------- */
.gp-cart-anchor {
    position: relative;
    display: inline-flex;
}
.gp-minicart {
    position: absolute;
    top: calc(100% + 12px);
    right: -14px;
    z-index: 60;
    width: 380px;
    max-width: calc(100vw - 24px);
    padding: 26px 24px 24px;
    border-top: 2px solid #ff6101;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
    color: #212121;
    text-align: left;
}
.gp-minicart__close {
    position: absolute;
    top: 6px;
    right: 12px;
    border: 0;
    background: transparent;
    color: #212121;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.gp-minicart__empty {
    margin: 8px 0 16px;
    font-size: 15px;
}
.gp-minicart__items {
    max-height: 340px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}
.gp-minicart__item {
    display: flex;
    gap: 16px;
    padding: 6px 0 18px;
}
.gp-minicart__image {
    flex: 0 0 110px;
}
.gp-minicart__image img {
    display: block;
    width: 110px;
    height: auto;
}
.gp-minicart__body {
    flex: 1 1 auto;
    min-width: 0;
}
.gp-minicart__name {
    margin: 0 0 6px;
    color: #4b5259;
    font-size: 13px;
    line-height: 1.4;
}
.gp-minicart__price,
.gp-minicart__price .price {
    color: #111;
    font-size: 22px;
    font-weight: 700;
}
.gp-minicart__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.gp-minicart__qty {
    width: 62px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid #7d848c;
    border-radius: 3px;
    text-align: center;
}
.gp-minicart__tools {
    display: inline-flex;
    gap: 10px;
}
.gp-minicart__tool {
    padding: 4px;
    border: 0;
    background: transparent;
    color: #ff6101;
    cursor: pointer;
}
.gp-minicart__foot {
    padding-top: 6px;
}
.gp-minicart__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
}
.gp-minicart__subtotal dd {
    margin: 0;
}
.gp-minicart__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border: 1px solid #ff6101;
    border-radius: 3px;
    background: #fff;
    color: #ff6101;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
.gp-minicart__button span:last-child {
    font-size: 26px;
    line-height: 1;
}
.gp-minicart__button:hover {
    background: #fff4ee;
}
@media (max-width: 639px) {
    .gp-cart-anchor {
        position: static;
    }
    .gp-minicart {
        position: fixed;
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}

/* Logged in: "Sie sind eingeloggt als:" + customer group name (e.g. GEWERBE), like the live shop */
#header .gp-user-link__group {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}
