/* Category Search Styles */
.category-search-container {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 0 15px;
}

.category-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.category-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 30px; /* Making it fully rounded for a modern look */
    font-size: 0.95rem;
    font-family: "Roboto", sans-serif;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333;
}

.category-search-input:focus {
    outline: none;
    border-color: #FE4F70;
    box-shadow: 0 0 0 3px rgba(254, 79, 112, 0.15);
}

.category-search-input::placeholder {
    color: #aaa;
    font-style: italic;
}

.category-search-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #aaa;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.category-search-clear:hover {
    background-color: #f0f0f0;
    color: #FE4F70;
}

.category-search-results-container {
    margin-top: 0.5rem;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    max-height: 350px;
    overflow-y: auto;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    position: absolute;
    width: calc(100% - 30px);
    left: 15px;
}

.category-search-result-item {
    border-bottom: 1px solid #f0f0f0;
}

.category-search-result-item:last-child {
    border-bottom: none;
}

.category-search-result-link {
    display: block;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.category-search-result-link:hover {
    background-color: #fdf6f8;
}

.category-search-result-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #222;
    font-size: 1rem;
    line-height: 1.3;
}

.category-search-result-path {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
}

.category-search-result-path .category-breadcrumb-item {
    display: inline;
    font-weight: 400;
}

.category-search-result-path .category-breadcrumb-item:first-child {
    font-weight: 500;
}

.category-search-result-path .category-breadcrumb-separator {
    color: #ccc;
    margin: 0 0.3rem;
    font-weight: 300;
}

.search-highlight {
    background-color: #FE4F70;
    color: white;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Add subtle glow effect */
.search-highlight::selection {
    background: rgba(254, 79, 112, 0.8);
    color: white;
}

.search-highlight::-moz-selection {
    background: rgba(254, 79, 112, 0.8);
    color: white;
}

.category-search-loading,
.category-search-no-results,
.category-search-error {
    padding: 1.5rem;
    text-align: center;
    color: #666;
    font-style: normal;
    font-size: 0.95rem;
}

.category-search-loading {
    color: #FE4F70;
    font-weight: 500;
}

.category-search-no-results:before,
.category-search-error:before {
    content: "🔍";
    display: block;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.category-search-no-results:before {
    content: "😔";
}

.category-search-error:before {
    content: "⚠️";
}

.search-results-header {
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.category-tree-container {
    transition: opacity 0.3s ease;
}

.category-search-active .category-tree-container {
    opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .category-search-container {
        padding: 0;
        margin-bottom: 1rem;
    }

    .category-search-results-container {
        left: 0;
        width: 100%;
    }
}

/* Scrollbar styling */
.category-search-results-container::-webkit-scrollbar {
    width: 6px;
}

.category-search-results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.category-search-results-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.category-search-results-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}