/*
 * Saját kereső (searchbox) – a fejléc keresőmező legördülője.
 * JS: public/js/manna_searchbox.js   Doksi: features.md "Saját kereső (searchbox)"
 */
.manna-searchbox-anchor { position: relative; }

.manna-searchbox {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1200;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 70vh;
    overflow-y: auto;
    text-align: left;
    font-size: 14px;
    line-height: 1.3;
}
.manna-searchbox.is-loading { opacity: 0.7; }

.manna-searchbox__status {
    padding: 14px 16px;
    color: #777;
}

.manna-searchbox__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.manna-searchbox__item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
}
.manna-searchbox__item a:hover,
.manna-searchbox__item.is-active a {
    background: #f6f3ee;
    text-decoration: none;
}
.manna-searchbox__item.is-unavailable a { opacity: 0.55; }

.manna-searchbox__img {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 4px;
    overflow: hidden;
    background: #f4f4f4;
}
.manna-searchbox__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.manna-searchbox__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.manna-searchbox__name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.manna-searchbox__name mark {
    background: transparent;
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #c9a96e;
    padding: 0;
}
.manna-searchbox__subtitle {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manna-searchbox__price {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 600;
    text-align: right;
}
.manna-searchbox__price del {
    color: #999;
    font-weight: 400;
    font-size: 12px;
    margin-right: 4px;
}
.manna-searchbox__price ins {
    text-decoration: none;
    color: #b4462a;
}

.manna-searchbox__all {
    display: block;
    padding: 10px 16px;
    border-top: 1px solid #eee;
    text-align: center;
    font-weight: 600;
    color: #333;
}
.manna-searchbox__all:hover { background: #f6f3ee; text-decoration: none; }

.manna-searchbox__banner {
    border-top: 1px solid #eee;
    padding: 10px 14px 12px;
}
.manna-searchbox__banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

@media (max-width: 767px) {
    .manna-searchbox { font-size: 13px; max-height: 60vh; }
    .manna-searchbox__img { flex-basis: 44px; width: 44px; height: 44px; }
}

/* ---- Overlay módú találati lista (a teljes képernyős keresőben) ---- */
.manna-searchbox--inline {
    position: static;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    font-size: 15px;
}
.manna-searchbox--inline .manna-searchbox__img { flex-basis: 64px; width: 64px; height: 64px; }
.manna-searchbox--inline .manna-searchbox__name { white-space: normal; }
.manna-searchbox--inline .manna-searchbox__subtitle { white-space: normal; }

/* ---- Teljes képernyős kereső (mobil, .js-searchbox-open nyitja) ---- */
.manna-searchbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #fff;
    display: none;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}
.manna-searchbox-overlay.is-open { display: flex; }
html.manna-searchbox-open,
html.manna-searchbox-open body { overflow: hidden; }

.manna-searchbox-overlay__bar {
    flex: 0 0 auto;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top));
    border-bottom: 1px solid #e3e3e3;
    background: #fff;
}
.manna-searchbox-overlay__form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 24px;
    padding: 0 6px 0 14px;
    background: #fafafa;
}
.manna-searchbox-overlay__icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 2px solid #777;
    border-radius: 50%;
    position: relative;
    box-sizing: border-box;
}
.manna-searchbox-overlay__icon::after {
    content: '';
    position: absolute;
    right: -7px;
    bottom: -6px;
    width: 8px;
    height: 2px;
    background: #777;
    transform: rotate(45deg);
}
.manna-searchbox-overlay__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 16px; /* iOS: 16px alatt zoomol fókuszkor */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.manna-searchbox-overlay__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.manna-searchbox-overlay__close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #555;
    cursor: pointer;
}
.manna-searchbox-overlay__body {
    flex: 1 1 auto;
    overflow-y: auto;
}

/* A mobil menü keresőmezője elrejtve: a fejléc ikonja nyitja a teljes képernyős keresőt */
.js-searchbox-menu-search { display: none !important; }
