/*
 * Search Autocomplete Styles - COMPACT VERSION
 * xHamster-style narrow rows
 */

:root {
    --ac-bg: #ffffff;
    --ac-bg-hover: #f5f5f5;
    --ac-border: #ddd;
    --ac-text: #333;
    --ac-text-light: #666;
    --ac-highlight: #000;
    --ac-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --ac-radius: 4px;
    --ac-font-size: 14px;
    --ac-z-index: 9999;
}

/* Wrapper */
.ac-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Input */
.ac-input {
    width: 100%;
    padding: 10px 14px;
    font-size: var(--ac-font-size);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    background: var(--ac-bg);
    color: var(--ac-text);
    outline: none;
    box-sizing: border-box;
}

.ac-input:focus {
    border-color: #999;
}

.ac-wrapper.ac-open .ac-input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Dropdown */
.ac-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: -1px;
    background: var(--ac-bg);
    border: 1px solid var(--ac-border);
    border-top: none;
    border-radius: 0 0 var(--ac-radius) var(--ac-radius);
    box-shadow: var(--ac-shadow);
    max-height: 400px;
    overflow-y: auto;
    z-index: var(--ac-z-index);
}

/* Items - COMPACT STYLE */
.ac-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;          /* Keskeny padding! */
    cursor: pointer;
    transition: background-color 0.1s;
    border-bottom: none;        /* Nincs border */
    line-height: 1.3;
}

.ac-item:hover,
.ac-item-active {
    background: var(--ac-bg-hover);
}

/* Search icon before each item */
.ac-item::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Item text */
.ac-item-text {
    flex: 1;
    font-size: var(--ac-font-size);
    color: var(--ac-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Highlighted/matched text - BOLD */
.ac-item-text strong {
    color: var(--ac-highlight);
    font-weight: 700;
}

/* Count badge (optional) */
.ac-item-count {
    margin-left: 10px;
    font-size: 11px;
    color: #999;
}

/* No results */
.ac-no-results {
    padding: 10px 12px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Scrollbar */
.ac-dropdown::-webkit-scrollbar {
    width: 6px;
}

.ac-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Mobile */
@media (max-width: 480px) {
    .ac-item {
        padding: 8px 12px;
    }
    
    :root {
        --ac-font-size: 15px;
    }
}
