/**
 * WowPlatter Search Styles
 * 
 * Focused styling for search filter tabs and header search functionality only.
 * All items.php styling is handled by items.css to prevent conflicts.
 */

/* Search Form Enhancements (Header Only) */
#wowplatter-search-form {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

#wowplatter-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#wowplatter-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0,124,186,0.2);
}

#wowplatter-search-form.loading #wowplatter-search-input {
    background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3" fill="%23007cba"><animate attributeName="r" values="3;6;3" dur="1s" repeatCount="indefinite"/><animate attributeName="opacity" values="1;0.5;1" dur="1s" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.search-submit {
    background: #007cba;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,124,186,0.3);
}

.search-submit:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,124,186,0.4);
}

.search-submit:active {
    transform: translateY(0);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 4px;
}

.search-suggestions.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestions-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.search-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.active {
    background-color: #f0f0f0;
}

.suggestion-text {
    flex: 1;
    font-size: 14px;
    color: #000000;
}

.suggestion-type {
    font-size: 12px;
    color: #000000;
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: capitalize;
}

/* Search Error */
.search-error {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    font-weight: bold;
}

.search-error.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search Info Panel */
.search-info-panel {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-query-display h2 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* Search Filter Tabs - For search result filtering */
.search-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.search-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.search-tab-btn:hover {
    background: #e9ecef;
    color: #007cba;
    border-color: #007cba;
    text-decoration: none;
}

.search-tab-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
    font-weight: 600;
}

.search-tab-btn .count {
    font-size: 12px;
    opacity: 0.8;
}

/* Legacy support for old search tabs */
.search-filter-tabs .search-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    background: transparent;
    margin-bottom: 20px;
}

.search-filter-tabs .search-tab {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.search-filter-tabs .search-tab:hover {
    background: #e9ecef;
    color: #007cba;
    border-color: #007cba;
}

.search-filter-tabs .search-tab.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
    font-weight: 600;
}

/* Responsive Design for Search Filter Tabs */
@media (max-width: 768px) {
    .search-filter-tabs .search-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-filter-tabs .search-tab {
        padding: 10px 16px;
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    #wowplatter-search-form {
        max-width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    #wowplatter-search-input {
        width: 100%;
    }
    
    .search-submit {
        margin-left: 0;
        width: 100%;
    }
}

/* Animation for loading state */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.search-form.loading .search-submit {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar styling for suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}