/* Search Results Styles */
.search-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Progress Bar */
.loading-progress {
    max-width: 400px;
    margin: 30px auto 0;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 14px;
    color: #666;
}

/* Error State */
.search-error {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

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

.search-no-results p {
    margin-bottom: 15px;
    color: #333;
}

.search-no-results ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.search-no-results li {
    padding: 5px 0;
    color: #666;
}

.search-no-results li:before {
    content: "•";
    margin-right: 10px;
    color: #999;
}

/* Search Results Header */
.search-results-header {
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.search-results-header p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.search-results-header strong {
    color: #000;
    font-weight: 600;
}

/* Search Result Items */
.search-results-list {
    padding: 20px 0;
}

.search-result-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    animation: fadeIn 0.5s ease;
}

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

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

.search-result-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.4;
}

.search-result-title a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-result-title a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.search-result-description {
    margin: 0 0 8px 0;
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

.search-result-url {
    font-size: 13px;
    color: #228B22;
    word-break: break-all;
}

/* Search Highlight */
.search-highlight,
mark.search-highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    font-weight: 500;
    color: inherit;
    border-radius: 2px;
}

/* Search Form Styles */
.search-result-section .search-content {
    padding: 30px 0;
}

.search-result-section .search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-result-section .search-text-box {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-result-section .search-text-box:focus {
    border-color: #0066cc;
}

.search-result-section .btn-search {
    padding: 12px 30px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-section .btn-search:hover {
    background-color: #0052a3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-result-section .search-form {
        flex-direction: column;
    }
    
    .search-result-section .search-text-box {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .search-result-section .btn-search {
        border-radius: 4px;
        width: 100%;
    }
    
    .search-result-title {
        font-size: 18px;
    }
    
    .search-result-description {
        font-size: 14px;
    }
    
    .loading-progress {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .search-results-header {
        padding: 15px 0;
    }
    
    .search-result-item {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .search-result-title {
        font-size: 16px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .progress-bar {
        height: 20px;
    }
}

/* Smooth transitions */
.search-result-section {
    transition: opacity 0.3s ease;
}

/* Accessibility improvements */
.search-result-title a:focus,
.btn-search:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .search-loading,
    .loading-spinner,
    .loading-progress,
    .search-form {
        display: none;
    }
    
    .search-result-item {
        page-break-inside: avoid;
    }
    
    .search-highlight,
    mark.search-highlight {
        background-color: transparent;
        font-weight: bold;
    }
}