/* ========================================
   General Search Styles
   ======================================== */

.blog-tools-general-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 45px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    font-size: 18px;
    color: #999;
    pointer-events: none;
}

.clear-search {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: #333;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Loading */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #666;
}

.search-loading i {
    font-size: 18px;
}

/* Search Results */
.search-results {
    padding: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: #f5f5f5;
}

/* Result Thumbnail */
.result-thumbnail {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
}

/* Result Details */
.result-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.result-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-type {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Results */
.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.search-no-results i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.search-no-results p {
    margin: 0;
    font-size: 14px;
}

/* Scrollbar Styling */
.search-results-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 0 12px 12px 0;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .blog-tools-general-search {
        max-width: 100%;
    }

    .search-input {
        padding: 12px 45px 12px 40px;
        font-size: 15px;
    }

    .search-results-dropdown {
        max-height: 400px;
    }

    .result-thumbnail {
        width: 40px;
        height: 40px;
    }

    .result-title {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .search-input {
        padding: 10px 40px 10px 35px;
        font-size: 14px;
    }

    .search-icon {
        left: 12px;
        font-size: 16px;
    }

    .clear-search {
        right: 10px;
        font-size: 14px;
    }

    .result-thumbnail {
        width: 35px;
        height: 35px;
    }

    .result-title {
        font-size: 13px;
    }

    .result-type {
        font-size: 11px;
    }
}

