/* Animated Search Bar Styles */
.search-progress-container {
    margin: 15px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: searchPulse 2s ease-in-out infinite;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.search-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes searchPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    }
}

.search-query {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 14px;
    border-radius: 8px;
    color: white;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 13px;
    margin-bottom: 12px;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.search-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.context-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    animation: chipFadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.context-chip:nth-child(1) { animation-delay: 0.1s; }
.context-chip:nth-child(2) { animation-delay: 0.2s; }
.context-chip:nth-child(3) { animation-delay: 0.3s; }
.context-chip:nth-child(4) { animation-delay: 0.4s; }
.context-chip:nth-child(5) { animation-delay: 0.5s; }
.context-chip:nth-child(6) { animation-delay: 0.6s; }

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

.context-chip-icon {
    font-size: 14px;
}

.search-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.search-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.9), rgba(255,255,255,0.6));
    background-size: 200% 100%;
    animation: progressShimmer 1.5s infinite;
    width: 100%;
}

@keyframes progressShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.search-status {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-style: italic;
}

/* Completion animation */
.search-progress-container.completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    animation: searchComplete 0.5s ease-out;
}

@keyframes searchComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.search-progress-container.completed .search-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: checkmark 0.5s ease-out forwards;
}

@keyframes checkmark {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
        opacity: 0;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .search-progress-container {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    .search-query {
        background: rgba(0, 0, 0, 0.2);
    }

    .context-chip {
        background: rgba(0, 0, 0, 0.25);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-progress-container {
        padding: 12px 16px;
    }

    .search-header {
        font-size: 13px;
    }

    .search-query {
        font-size: 12px;
        padding: 8px 12px;
    }

    .context-chip {
        font-size: 11px;
        padding: 5px 10px;
    }
}
