/* Ghabmob search modal, matched to SearchBarPage desktop (1920x1024) and mobile (375x812). */
.header__search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: #202A44;
    cursor: pointer;
}

/* The search overlay does not modify the existing header, menu or product styles. */
.gh-search {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    background: #DEDEDE;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-family: Peyda, sans-serif;
    color: #48566F;
}

body.gh-search-open { overflow: hidden; }

.gh-search__panel {
    position: relative;
    width: 640px;
    max-width: calc(100% - 48px);
    margin: max(0px, calc((100dvh - 627px) / 2)) auto 24px;
}

.gh-search__close-row {
    height: 28px;
    margin-bottom: 43px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.gh-search__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #202A44;
    cursor: pointer;
}

.gh-search__form {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    height: 84px;
    width: 100%;
    border-radius: 20px;
    background: #fff;
    padding: 16px;
}
.gh-search__submit {
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: #34446E;
    color: #fff;
    cursor: pointer;
}
.gh-search__input {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    height: 52px;
    border: 0;
    outline: none;
    border-radius: 12px;
    background: #F3F4F5;
    color: #48566F;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    direction: rtl;
    appearance: none;
}
.gh-search__input::placeholder { color: #48566F; opacity: 1; }
.gh-search__input::-webkit-search-cancel-button { cursor: pointer; }

.gh-search__suggestions {
    margin-top: 18px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
}
.gh-search__suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.gh-search__suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: none;
    border-radius: 16px;
    background: #F9F9F9;
    color: #48566F;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
}
.gh-search__suggestion-text {
    font-size: 14px;
    font-weight: 500;
}
.gh-search__suggestion-icon {
    flex: none;
    width: 19px;
    height: 19px;
    color: #34446E;
}
.gh-search__suggestion:hover, .gh-search__suggestion:focus-visible { background: #F3F4F5; }
.gh-search__all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 18px;
    border-radius: 16px;
    background: #DCE5F2;
    color: #34446E;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}
.gh-search__all:hover, .gh-search__all:focus-visible { background: #C9D9EF; }
.gh-search__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 767px) {
    .gh-search__panel {
        width: calc(100% - 50px);
        max-width: 400px;
        margin: 77px auto 24px;
    }
    .gh-search__close-row { height: 24px; margin-bottom: 53px; }
    .gh-search__close { width: 28px; height: 28px; }
    .gh-search__close svg { width: 28px; height: 28px; }
    .gh-search__form {
        height: 56px;
        border-radius: 16px;
        padding: 8px;
        gap: 7px;
    }
    .gh-search__submit {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
    }
    .gh-search__submit svg { width: 25px; height: 25px; }
    .gh-search__input { height: 40px; border-radius: 12px; font-size: 16px; padding: 0 12px; }
    .gh-search__suggestions { margin-top: 10px; padding: 12px; border-radius: 16px; }
    .gh-search__suggestion-list { gap: 10px; }
    .gh-search__suggestion { height: 44px; border-radius: 13px; padding: 0 12px; }
    .gh-search__suggestion-text { font-size: 16px; }
    .gh-search__suggestion-icon { width: 18px; height: 18px; }
    .gh-search__all { height: 36px; margin-top: 10px; border-radius: 12px; font-size: 16px; }
}


/* v1.0.13: gentle entry/exit, respects reduced motion and original pixel geometry. */
.gh-search[hidden] { display: none !important; }
.gh-search.gh-search--entering { animation: ghSearchFadeIn 190ms ease-out both; }
.gh-search.gh-search--leaving { animation: ghSearchFadeOut 170ms ease-in both; }
.gh-search.gh-search--entering .gh-search__panel {
    animation: ghSearchPanelIn 220ms cubic-bezier(.2,.8,.2,1) both;
}
.gh-search.gh-search--leaving .gh-search__panel {
    animation: ghSearchPanelOut 170ms ease-in both;
}
@keyframes ghSearchFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ghSearchFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes ghSearchPanelIn { from { opacity: 0; transform: translateY(10px) scale(.988); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ghSearchPanelOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(6px); } }

/* A subtle loader inside the existing dark-blue search button: no reflow. */
.gh-search__submit-icon { display: inline-flex; align-items: center; justify-content: center; }
.gh-search__spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    border-radius: 50%;
    animation: ghSearchSpin .7s linear infinite;
}
.gh-search.gh-search--loading .gh-search__submit-icon { display: none; }
.gh-search.gh-search--loading .gh-search__spinner { display: block; }
@keyframes ghSearchSpin { to { transform: rotate(360deg); } }

/* Keep five search suggestion rows stable when live results are loading. */
.gh-search__suggestion--skeleton { pointer-events: none; }
.gh-search__skeleton-bar {
    display: block;
    width: min(46%, 156px);
    height: 11px;
    border-radius: 8px;
    background: linear-gradient(95deg, #e7e9ee 20%, #f5f6f8 48%, #e7e9ee 76%);
    background-size: 220% 100%;
    animation: ghSearchShimmer 1.15s ease-in-out infinite;
}
.gh-search__skeleton-bar--short { width: 19px; height: 19px; border-radius: 5px; }
@keyframes ghSearchShimmer { to { background-position-x: -220%; } }
.gh-search__suggestion--link { text-decoration: none; }
.gh-search__suggestion--message { cursor: default; justify-content: center; font-size: 14px; }
.gh-search__suggestion--message:hover { background: #f9f9f9; }
.gh-search__suggestion--link:focus-visible,
.gh-search__close:focus-visible,
.gh-search__submit:focus-visible { outline: 2px solid #34446E; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .gh-search.gh-search--entering,
    .gh-search.gh-search--leaving,
    .gh-search.gh-search--entering .gh-search__panel,
    .gh-search.gh-search--leaving .gh-search__panel,
    .gh-search__spinner,
    .gh-search__skeleton-bar { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Grouped catalogue results: phone brands/models, design categories and products. */
.gh-search__group-heading {
    margin: 8px 0 -8px;
    color: #34446E;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}
.gh-search__suggestion--link {
    gap: 10px;
    min-height: 56px;
    height: auto;
    padding-top: 9px;
    padding-bottom: 9px;
    text-decoration: none;
}
.gh-search__suggestion-copy {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    text-align: right;
}
.gh-search__suggestion-subtitle {
    color: #7B8498;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
}
.gh-search__suggestion-kind {
    flex: 0 0 auto;
    max-width: 90px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #EEF2F8;
    color: #48566F;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .gh-search__group-heading { margin-top: 5px; font-size: 11px; }
    .gh-search__suggestion-kind { max-width: 78px; font-size: 9px; }
    .gh-search__suggestion-subtitle { font-size: 10px; }
}


/* Desktop modal scroll containment: the results list is the only scrolling region.
   Keep the close control, input and "all results" action stationary, and do not
   change the mobile overlay's existing document-height behaviour. */
@media (min-width: 768px) {
    .gh-search {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 24px 0;
        overflow: hidden;
        overscroll-behavior: contain;
    }
    .gh-search__panel {
        display: flex;
        flex-direction: column;
        width: 640px;
        max-width: calc(100% - 48px);
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
        min-height: 0;
        margin: 0 auto;
    }
    .gh-search__close-row,
    .gh-search__form {
        flex: 0 0 auto;
    }
    .gh-search__suggestions {
        display: flex;
        flex: 0 1 auto;
        flex-direction: column;
        min-height: 0;
    }
    .gh-search__suggestion-list {
        flex: 0 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
    .gh-search__all {
        flex: 0 0 auto;
    }
}

@media (min-width: 768px) and (max-height: 650px) {
    .gh-search__close-row { margin-bottom: 18px; }
}
