.haz-aps-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.haz-aps-form {
    position: relative;
    width: 100%;
}

.haz-aps-form .haz-aps-input,
.haz-aps-auto-wrap input[type="search"] {
    width: 100%;
    box-sizing: border-box;
}

.haz-aps-submit {
    margin-top: 8px;
}

.haz-aps-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
}

.haz-aps-results.is-open {
    display: block;
}

.haz-aps-message {
    padding: 14px;
    font-size: 14px;
}

.haz-aps-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0,0,0,.07);
    align-items: center;
}

.haz-aps-item:hover,
.haz-aps-item:focus {
    background: rgba(0,0,0,.04);
    outline: none;
}

.haz-aps-img {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.haz-aps-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.haz-aps-info {
    min-width: 0;
    display: block;
    flex: 1;
}

.haz-aps-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25;
    margin-bottom: 3px;
}

.haz-aps-sku,
.haz-aps-excerpt,
.haz-aps-stock {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    opacity: .78;
}

.haz-aps-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.haz-aps-price {
    font-weight: 700;
    font-size: 13px;
}

.haz-aps-more {
    display: block;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    background: rgba(0,0,0,.035);
}

@media (max-width: 600px) {
    .haz-aps-results {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 80px;
        max-height: calc(100vh - 110px);
    }
}


.haz-aps-no-button .haz-aps-submit,
.haz-aps-no-button input[type="submit"],
.haz-aps-no-button button[type="submit"] {
    display: none !important;
}

.haz-aps-no-button .haz-aps-wrap {
    display: block;
}


.haz-aps-storefront-search .haz-aps-form {
    margin: 0;
}

.haz-aps-storefront-search .haz-aps-wrap {
    width: 100%;
}

.haz-aps-storefront-search .haz-aps-input {
    width: 100%;
    min-height: 42px;
}

.site-header .haz-aps-storefront-search .haz-aps-results {
    text-align: left;
}

@media (min-width: 768px) {
    .site-header .haz-aps-storefront-search {
        float: right;
        margin-bottom: 0;
        clear: none;
    }
}


/* 1.0.4 - pörgő ikon és stabil legördülő találatlista */
.haz-aps-wrap {
    position: relative;
}

.haz-aps-wrap.is-searching::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(0,0,0,.18);
    border-top-color: rgba(0,0,0,.62);
    border-radius: 50%;
    animation: hazApsSpin .75s linear infinite;
    pointer-events: none;
    z-index: 100000;
}

.haz-aps-no-button .haz-aps-wrap.is-searching input[type="search"],
.haz-aps-no-button .haz-aps-wrap.is-searching .haz-aps-input {
    padding-right: 38px;
}

@keyframes hazApsSpin {
    to {
        transform: rotate(360deg);
    }
}

.haz-aps-results.is-loading {
    min-height: 46px;
}

.haz-aps-results.is-open {
    display: block;
}

.site-header .haz-aps-results,
.haz-aps-storefront-search .haz-aps-results {
    top: calc(100% + 8px);
    min-width: 320px;
    max-width: 520px;
}

.haz-aps-storefront-search .haz-aps-message {
    color: #333;
    background: #fff;
}


/* 1.0.5 - Storefront fejléc méret és mobil javítás */
.site-header .haz-aps-storefront-search,
.site-header .site-search.haz-aps-storefront-search {
    width: 230px;
    max-width: 230px;
}

.site-header .haz-aps-storefront-search .haz-aps-form,
.site-header .haz-aps-storefront-search .haz-aps-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.site-header .haz-aps-storefront-search .haz-aps-input,
.site-header .haz-aps-storefront-search input[type="search"] {
    width: 100%;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    font-size: 13px;
    color: #222;
    background: #fff;
}

.site-header .haz-aps-storefront-search .haz-aps-results,
.site-header .site-search.haz-aps-storefront-search .haz-aps-results,
.haz-aps-storefront-search .haz-aps-results {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    top: calc(100% + 6px);
    color: #222;
    background: #fff;
    text-align: left;
    border-radius: 4px;
    max-height: 360px;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.site-header .haz-aps-storefront-search .haz-aps-results *,
.haz-aps-storefront-search .haz-aps-results * {
    color: inherit;
}

.site-header .haz-aps-storefront-search .haz-aps-item,
.haz-aps-storefront-search .haz-aps-item {
    min-height: 0;
    padding: 7px 8px;
    gap: 8px;
    color: #222;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    align-items: flex-start;
}

.site-header .haz-aps-storefront-search .haz-aps-item:hover,
.haz-aps-storefront-search .haz-aps-item:hover {
    background: #f6f7f7;
}

.site-header .haz-aps-storefront-search .haz-aps-img,
.haz-aps-storefront-search .haz-aps-img {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 4px;
}

.site-header .haz-aps-storefront-search .haz-aps-title,
.haz-aps-storefront-search .haz-aps-title {
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    color: #222;
    margin: 0 0 2px;
}

.site-header .haz-aps-storefront-search .haz-aps-sku,
.site-header .haz-aps-storefront-search .haz-aps-excerpt,
.site-header .haz-aps-storefront-search .haz-aps-stock,
.haz-aps-storefront-search .haz-aps-sku,
.haz-aps-storefront-search .haz-aps-excerpt,
.haz-aps-storefront-search .haz-aps-stock {
    font-size: 10px;
    line-height: 1.25;
    color: #666;
    opacity: 1;
}

.site-header .haz-aps-storefront-search .haz-aps-excerpt,
.haz-aps-storefront-search .haz-aps-excerpt {
    display: none;
}

.site-header .haz-aps-storefront-search .haz-aps-meta,
.haz-aps-storefront-search .haz-aps-meta {
    gap: 6px;
    margin-top: 2px;
}

.site-header .haz-aps-storefront-search .haz-aps-price,
.haz-aps-storefront-search .haz-aps-price {
    font-size: 11px;
    line-height: 1.25;
    color: #222;
    font-weight: 700;
}

.site-header .haz-aps-storefront-search .haz-aps-more,
.haz-aps-storefront-search .haz-aps-more {
    padding: 8px;
    font-size: 12px;
    color: #222;
    background: #f2f2f2;
}

.site-header .haz-aps-storefront-search .haz-aps-message,
.haz-aps-storefront-search .haz-aps-message {
    padding: 10px;
    font-size: 12px;
    color: #333;
    background: #fff;
}

/* Felülírja a korábbi mobil fixed találatlistát, mert Storefront fejlécben szétesést okozhat */
@media (max-width: 767px) {
    .site-header .haz-aps-storefront-search,
    .site-header .site-search.haz-aps-storefront-search {
        width: 100%;
        max-width: 100%;
        float: none;
        clear: both;
        margin-top: 10px;
    }

    .site-header .haz-aps-storefront-search .haz-aps-results,
    .haz-aps-storefront-search .haz-aps-results,
    .haz-aps-results {
        position: absolute;
        left: 0;
        right: auto;
        top: calc(100% + 6px);
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        max-height: 300px;
        border-radius: 4px;
    }

    .site-header .haz-aps-storefront-search .haz-aps-input,
    .site-header .haz-aps-storefront-search input[type="search"] {
        height: 40px;
        min-height: 40px;
        font-size: 14px;
    }

    .site-header .haz-aps-storefront-search .haz-aps-img,
    .haz-aps-storefront-search .haz-aps-img {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .site-header .haz-aps-storefront-search .haz-aps-title,
    .haz-aps-storefront-search .haz-aps-title {
        font-size: 12px;
    }
}
