/* Shared hub page toolbar: name search autocomplete + sort tags */

.sort-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.sort-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.sort-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
    margin-right: 4px;
}

.sort-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.sort-tag {
    background: #f8f9fa;
    color: #6c757d;
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 15px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    font-family: inherit;
}

.sort-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.sort-tag.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.tools-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.name-search-section {
    width: 100%;
}

.name-search-section label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.name-search-box {
    position: relative;
    max-width: 420px;
}

.name-search-box::before {
    content: '🔍';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
}

.name-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.name-search-input::placeholder {
    color: #9aa0a6;
}

.name-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.name-search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    padding: 6px;
}

.name-search-suggestions.visible {
    display: block;
}

.name-search-suggestions-header {
    padding: 6px 10px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 4px;
}

.name-search-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    color: #2c3e50;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.name-search-suggestion:last-child {
    margin-bottom: 0;
}

.name-search-suggestion-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.name-search-suggestion-score {
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.name-search-suggestion:hover,
.name-search-suggestion.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
}

.name-search-suggestion:hover .name-search-suggestion-score,
.name-search-suggestion.active .name-search-suggestion-score {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: none;
}

.name-search-suggestion mark {
    background: transparent;
    color: #667eea;
    font-weight: 700;
}

.name-search-suggestion:hover mark,
.name-search-suggestion.active mark {
    color: #ffffff;
}

.name-search-empty {
    padding: 14px 12px;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #e9ecef;
    border-radius: 8px;
}

.reset-filters-btn {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
    color: white;
    border: none;
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reset-filters-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
}

.mobile-reset-btn {
    display: none !important;
}

.desktop-reset-btn {
    display: flex;
}

@media (min-width: 768px) {
    .mobile-reset-btn {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .mobile-reset-btn {
        display: flex !important;
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
    }

    .desktop-reset-btn {
        display: none !important;
    }

    .sort-section {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 10px;
    }

    .sort-controls {
        justify-content: flex-start;
    }

    .name-search-box {
        max-width: 100%;
    }
}
