/* Search Functionality Styles */

.cg-search {
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cg-search:focus {
    outline: none;
    border-color: #ffd101;
    box-shadow: 0 0 8px rgba(255, 209, 1, 0.3);
    background: #fffef5;
}

/* Highlight matched search results */
.search-highlight {
    animation: highlightPulse 0.3s ease;
}

@keyframes highlightPulse {
    0% {
        background-color: #fffacd;
    }
    100% {
        background-color: #fff;
    }
}

/* Empty state message */
.search-empty-state {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 15px;
}

.search-empty-state p {
    margin: 0;
    font-weight: 500;
}

/* Additional search styling for better UX */
.cat-grid li[style*="display: none"],
.content > div[style*="display: none"] {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cat-grid li:not([style*="display: none"]),
.content > div:not([style*="display: none"]) {
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clear search button styling (optional) */
.search-clear-btn {
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: none;
}

.search-clear-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.cg-search:not(:placeholder-shown) + .search-clear-btn,
.cg-search:focus + .search-clear-btn {
    display: inline-block;
}

/* Mobile responsive search styling */
@media (max-width: 600px) {
    .cg-search {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .search-empty-state {
        font-size: 14px;
        padding: 15px;
    }
}
