/* Filter Autocomplete v6 - Type-ahead suggestions */

.zs-ac {
    position: relative;
    margin-bottom: 6px;
}

.zs-ac-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

.zs-ac-input:focus {
    border-color: #f57c00;
    box-shadow: 0 0 0 2px rgba(245,124,0,0.08);
}

.zs-ac-input::placeholder {
    color: #b0b0b0;
}

/* Suggestion list */
.zs-ac-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
}

.zs-ac-list::-webkit-scrollbar {
    width: 4px;
}

.zs-ac-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.zs-ac-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}

.zs-ac-item:last-child {
    border-bottom: none;
}

.zs-ac-item:hover {
    background: #fff5eb;
}

.zs-ac-item strong {
    color: #f57c00;
    font-weight: 700;
}

.zs-ac-item.zs-ac-checked {
    background: #fff8f0;
    color: #b45309;
}

.zs-ac-item.zs-ac-checked::before {
    content: '✓ ';
    color: #f57c00;
    font-weight: 700;
}

.zs-ac-empty,
.zs-ac-more {
    padding: 12px;
    text-align: center;
    color: #aaa;
    font-size: 12px;
    cursor: default;
}

/* Parent indicator in suggestions */
.zs-ac-parent {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.zs-ac-parent::before {
    content: '— ';
}

/* Tags */
.zs-ac-tags {
    display: none;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}

.zs-ac-tags:not(:empty) {
    display: flex;
}

.zs-ac-tag {
    display: inline-flex;
    align-items: center;
    background: #f57c00;
    color: #fff;
    padding: 3px 5px 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.4;
    gap: 2px;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zs-ac-tag-x {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.8;
    padding: 0 2px;
    margin-left: 2px;
}

.zs-ac-tag-x:hover {
    opacity: 1;
}

/* Hide originals when autocomplete is active */
.zs-ac-init .rtcl-ajax-filter-data > .rtcl-ajax-filter-data-item {
    display: none !important;
}

.zs-ac-init .rtcl-ajax-filter-data > .rtcl-more-less-btn {
    display: none !important;
}

/* Ensure autocomplete wrapper and tags are always visible */
.zs-ac-init .rtcl-ajax-filter-data > .zs-ac,
.zs-ac-init .rtcl-ajax-filter-data > .zs-ac-tags {
    display: block !important;
}

.zs-ac-init .rtcl-ajax-filter-data > .zs-ac-tags:not(:empty) {
    display: flex !important;
}

/* Ensure the filter content area is visible */
.zs-ac-init .rtcl-filter-content {
    display: block !important;
    overflow: visible !important;
}

/* Mobile */
@media (max-width: 768px) {
    .zs-ac-input {
        font-size: 16px;
        padding: 11px 12px;
    }
}