/* Search Component Styles */

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

#search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#search-input:focus {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Search Results Dropdown */
#search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

.search-results-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.search-result-item {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #ffd700;
    padding-left: 17px;
}

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

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.search-result-category {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.search-result-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.4;
}

.search-result-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.search-result-excerpt mark {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
}

.search-no-results p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        padding: 0 15px;
    }

    #search-input {
        font-size: 0.95rem;
        padding: 12px 45px 12px 18px;
    }

    #search-results {
        max-height: 400px;
        border-radius: 15px;
    }

    .search-result-item {
        padding: 12px 15px;
    }

    .search-result-title {
        font-size: 1rem;
    }

    .search-result-excerpt {
        font-size: 0.85rem;
    }
}

/* Dark mode support (if theme toggle is enabled) */
body.light-mode .search-container {
    #search-input {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
        color: #333;
    }

    #search-input::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }

    #search-input:focus {
        border-color: #d97706;
        box-shadow: 0 0 20px rgba(217, 119, 6, 0.2);
    }

    .search-icon {
        color: rgba(0, 0, 0, 0.4);
    }

    #search-results {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .search-results-header {
        color: rgba(0, 0, 0, 0.6);
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }

    .search-result-item {
        border-bottom-color: rgba(0, 0, 0, 0.05);
    }

    .search-result-item:hover {
        background: rgba(217, 119, 6, 0.1);
        border-left-color: #d97706;
    }

    .search-result-category {
        background: rgba(217, 119, 6, 0.2);
        color: #d97706;
    }

    .search-result-date {
        color: rgba(0, 0, 0, 0.5);
    }

    .search-result-title {
        color: #1a1a1a;
    }

    .search-result-excerpt {
        color: rgba(0, 0, 0, 0.7);
    }

    .search-result-excerpt mark {
        background: rgba(217, 119, 6, 0.3);
        color: #d97706;
    }

    .search-no-results p {
        color: rgba(0, 0, 0, 0.6);
    }
}
