/* SearchSuggest specific styles */
:root {
    --searchsuggest-hotword-left: 12px;
    --searchsuggest-hotword-right: 12px;
    --searchsuggest-hotword-top: 50%;
    --searchsuggest-hotword-height: 1.4em;
    --searchsuggest-hotword-line-height: 1.4em;
    --searchsuggest-hotword-color: #999999;
    --searchsuggest-hotword-z: 2;
    --searchsuggest-hotword-duration: 0.3s;
    --searchsuggest-hotword-easing: ease;
    --searchsuggest-hotword-color-dark: #9ca3af;
}

.search-suggest-container {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-size: 14px;
    margin-top: -1px;
    list-style: none;
    padding: 0;
    margin: 0;
}

[class*="search-suggest-hotword-ticker"] {
    position: absolute;
    left: var(--searchsuggest-hotword-left, 12px);
    right: var(--searchsuggest-hotword-right, 12px);
    top: var(--searchsuggest-hotword-top, 50%);
    height: var(--searchsuggest-hotword-height, 1.4em);
    line-height: var(--searchsuggest-hotword-line-height, 1.4em);
    transform: translateY(-50%);
    pointer-events: none;
    overflow: hidden;
    color: var(--searchsuggest-hotword-color, #999999);
    z-index: var(--searchsuggest-hotword-z, 2);
    white-space: nowrap;
}

[class*="search-suggest-hotword-ticker"] > [class*="search-suggest-hotword-current"],
[class*="search-suggest-hotword-ticker"] > [class*="search-suggest-hotword-next"] {
    position: absolute;
    left: 0;
    right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition:
        transform var(--searchsuggest-hotword-duration, 0.3s) var(--searchsuggest-hotword-easing, ease),
        opacity var(--searchsuggest-hotword-duration, 0.3s) var(--searchsuggest-hotword-easing, ease);
}

[class*="search-suggest-hotword-ticker"] > [class*="search-suggest-hotword-current"] i,
[class*="search-suggest-hotword-ticker"] > [class*="search-suggest-hotword-next"] i {
    margin-right: 0.35em;
}

[class*="search-suggest-hotword-ticker"].is-resetting > [class*="search-suggest-hotword-current"],
[class*="search-suggest-hotword-ticker"].is-resetting > [class*="search-suggest-hotword-next"] {
    transition: none;
}

[class*="search-suggest-hotword-ticker"] > [class*="search-suggest-hotword-current"] {
    transform: translateY(0%);
    opacity: 1;
}

[class*="search-suggest-hotword-ticker"] > [class*="search-suggest-hotword-next"] {
    transform: translateY(100%);
    opacity: 0;
}

[class*="search-suggest-hotword-ticker"].is-animating > [class*="search-suggest-hotword-current"] {
    transform: translateY(-100%);
    opacity: 0;
}

[class*="search-suggest-hotword-ticker"].is-animating > [class*="search-suggest-hotword-next"] {
    transform: translateY(0%);
    opacity: 1;
}

@media (min-width: 769px) {
    .search-suggest-container {
        position: absolute;
    }
}

@media (max-width: 768px) {
    .search-suggest-container {
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }
}

.search-suggest-container .search-suggest-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    transition: all 0.2s ease;
    list-style: none;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-suggest-container .search-suggest-label {
    flex: 1;
    min-width: 0;
}

.search-suggest-container .search-suggest-item-hot::after {
    content: var(--searchsuggest-hot-icon, '');
    margin-left: 0.35em;
    flex-shrink: 0;
}

.search-suggest-container .search-suggest-hot-icon {
    margin-left: 0.35em;
    flex-shrink: 0;
}

.search-suggest-container .search-suggest-item:last-child {
    border-bottom: none;
    border-radius: 0 0 4px 4px;
}

.search-suggest-container .search-suggest-item:hover,
.search-suggest-container .search-suggest-item.active {
    background-color: #f0f7ff;
    color: #0066cc;
    padding-left: 18px;
    font-weight: 500;
}

/* Scrollbar styles */
.search-suggest-container::-webkit-scrollbar {
    width: 6px;
}

.search-suggest-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-suggest-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-suggest-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (max-width: 768px) {
    .search-suggest-container {
        font-size: 13px;
    }

    .ec-drawerRole.is_active .ec-headerSearch .ec-headerSearch__keywordBtn {
        top: 17px;
    }    
    
    .search-suggest-container .search-suggest-item {
        padding: 8px 12px;
    }

    [class*="search-suggest-hotword-ticker"] {
        left: var(--searchsuggest-hotword-left-mobile, 10px);
        right: var(--searchsuggest-hotword-right-mobile, 10px);
    }
}

@media (prefers-color-scheme: dark) {
    .search-suggest-container {
        background: #2d2d2d;
        border-color: #404040;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
    .search-suggest-container .search-suggest-item {
        color: #e0e0e0;
        border-bottom-color: #404040;
    }
    
    .search-suggest-container .search-suggest-item:hover,
    .search-suggest-container .search-suggest-item.active {
        background-color: #3d3d3d;
        color: #4da6ff;
    }

    [class*="search-suggest-hotword-ticker"] {
        color: var(--searchsuggest-hotword-color-dark, #9ca3af);
    }
}