/* Search box + suggestions dropdown (modern header). Self-contained: every class is
   prefixed rl- so the legacy .suggestion-* rules in other stylesheets cannot interfere. */

:root {
    --rl-brand: #913075;
    --rl-brand-dark: #6f2359;
    --rl-tint: #f6eef9;
    --rl-tint-border: #e6d5ee;
    --rl-mark: #e9d5f7;
    --rl-mark-text: #5b1d6e;
}

/* ---------- Search inputs ---------- */
#desktopSearchInput,
#mobileHeaderSearchInput,
#mobileSearchInput {
    background: #f8f5fa !important;
    border: 1.5px solid #ece4f0 !important;
    border-radius: 14px !important;
    padding-inline-end: 40px !important;
    transition: border-color .2s, box-shadow .2s, background .2s !important;
}
#desktopSearchInput { height: 46px !important; border-radius: 999px !important; }
#desktopSearchInput:focus,
#mobileHeaderSearchInput:focus,
#mobileSearchInput:focus {
    background: #fff !important;
    border-color: var(--rl-brand) !important;
    box-shadow: 0 0 0 4px rgba(145, 48, 117, .12) !important;
    outline: none !important;
}

.rl-search-clear {
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #e9e1ee;
    color: #6b5b75;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.rl-search-clear.is-visible { display: flex; }
.rl-search-clear:hover { background: var(--rl-tint-border); color: var(--rl-brand-dark); }

/* ---------- Dropdown container ---------- */
.rl-suggest {
    background: #fff;
    border: 1px solid #efe6f3;
    border-radius: 18px;
    box-shadow: 0 18px 45px -12px rgba(80, 20, 70, .28), 0 4px 12px rgba(0, 0, 0, .05);
    padding: 8px;
    max-height: min(72vh, 540px);
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: rl-suggest-in .16s ease-out;
}
.rl-suggest.hidden { display: none !important; }
/* some global stylesheets force links to ltr: follow the page direction instead */
.rl-suggest * { direction: inherit !important; }
.rl-suggest--inline { box-shadow: none; border: 0; padding: 0 16px; max-height: none; animation: none; }
@keyframes rl-suggest-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rl-suggest-caption {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #9a8aa5;
    padding: 6px 10px 8px;
}

/* ---------- Result row ---------- */
.rl-suggest-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    padding: 10px;
    min-height: 88px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.rl-suggest-item:hover,
.rl-suggest-item.is-active { background: var(--rl-tint); box-shadow: none; }
.rl-suggest-item.is-active { box-shadow: inset 0 0 0 1.5px var(--rl-tint-border); }

.rl-suggest-thumb {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    border: 1.5px solid var(--rl-tint-border);
    background: #fff;
    padding: 5px;
    object-fit: contain;
    display: block;
}

.rl-suggest-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rl-suggest-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.55;
    color: #1f1633;
    text-align: start;
}
.rl-suggest-mark {
    background: var(--rl-mark);
    color: var(--rl-mark-text);
    font-weight: 800;
    border-radius: 5px;
    padding: 0 2px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.rl-suggest-price {
    align-self: flex-start;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    direction: ltr !important;
    unicode-bidi: isolate;
    background: #fbf3f8;
    border-radius: 999px;
    padding: 3px 12px;
}
.rl-price-num { font-size: 15px; font-weight: 800; color: var(--rl-brand); letter-spacing: .01em; }
.rl-price-cur { font-size: 11px; font-weight: 700; color: #a2799a; }
.rl-suggest-go { display: none; }

@media (min-width: 768px) {
    .rl-suggest-item { grid-template-columns: 68px minmax(0, 1fr) auto; }
    .rl-suggest-go { display: inline-block; color: #c9b8d3; font-size: 12px; transition: transform .15s, color .15s; }
    .rl-suggest-item:hover .rl-suggest-go,
    .rl-suggest-item.is-active .rl-suggest-go { color: var(--rl-brand); }
    [dir="rtl"] .rl-suggest-go { transform: scaleX(-1); }
}

/* ---------- Footer button ---------- */
.rl-suggest-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--rl-brand), #b0408f);
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: filter .15s;
}
.rl-suggest-all:hover { filter: brightness(1.08); }
[dir="rtl"] .rl-suggest-all .fa-arrow-right { transform: scaleX(-1); }

/* ---------- Loading + empty states ---------- */
.rl-suggest-skel { display: grid; grid-template-columns: 68px 1fr; column-gap: 12px; padding: 8px 10px; }
.rl-suggest-skel i, .rl-suggest-skel b, .rl-suggest-skel u {
    display: block;
    border-radius: 12px;
    background: linear-gradient(90deg, #f3edf6 25%, #faf6fc 50%, #f3edf6 75%);
    background-size: 200% 100%;
    animation: rl-shimmer 1.2s infinite linear;
}
.rl-suggest-skel i { width: 68px; height: 68px; grid-row: span 2; }
.rl-suggest-skel b { height: 14px; margin-top: 8px; }
.rl-suggest-skel u { height: 12px; width: 40%; margin-top: 8px; }
@keyframes rl-shimmer { to { background-position: -200% 0; } }

.rl-suggest-empty { text-align: center; padding: 26px 16px; color: #7a6a85; font-size: 14px; }
.rl-suggest-empty i { display: block; font-size: 26px; color: #d3c1dd; margin-bottom: 10px; }
