/**
 * Advanced Search Styles
 * Dark theme with teal accents
 */

.search-container {
    min-height: 100vh;
    background: #0a0e27;
}

/* Hero Section */
.search-hero {
    background: linear-gradient(135deg, #1a1d3a 0%, #0a0e27 100%);
    padding: 3rem 1rem;
    border-bottom: 2px solid #64ffda;
}

.search-hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.search-hero h1 {
    font-size: 2.5rem;
    color: #64ffda;
    text-align: center;
    margin-bottom: 1.5rem;
}

.search-description {
    color: #ccc;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.search-description h1 {
    font-size: 1.8rem;
    color: #fff;
    margin-top: 2rem;
}

.search-description h2 {
    font-size: 1.3rem;
    color: #64ffda;
    margin-top: 1.5rem;
}

.search-description ul {
    margin-left: 1.5rem;
}

/* Search Interface */
.search-interface {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Search Box */
.search-box-container {
    position: relative;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1.1rem;
    background: #1a1d3a;
    border: 2px solid #2d3748;
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.search-input::placeholder {
    color: #666;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    pointer-events: none;
}

/* Filter Panel */
.filter-panel {
    background: #1a1d3a;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #2d3748;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-header h3 {
    font-size: 1.3rem;
    color: #64ffda;
    margin: 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.filter-select {
    padding: 0.75rem;
    background: #0a0e27;
    border: 1px solid #2d3748;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #64ffda;
}

.filter-select option {
    padding: 0.5rem;
    background: #0a0e27;
    color: #fff;
}

.filter-select option:checked {
    background: #64ffda;
    color: #0a0e27;
}

.filter-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.3rem;
    font-style: italic;
}

.year-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-input {
    flex: 1;
    padding: 0.75rem;
    background: #0a0e27;
    border: 1px solid #2d3748;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
}

.year-input:focus {
    outline: none;
    border-color: #64ffda;
}

.year-range span {
    color: #666;
}

/* Active Filters */
.active-filters {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2d3748;
}

.active-filters-header {
    font-weight: 600;
    color: #64ffda;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2d3748;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.filter-tag-label {
    color: #64ffda;
    font-weight: 600;
}

.filter-tag-value {
    color: #fff;
}

.filter-tag-remove {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.filter-tag-remove:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* Results Summary */
.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    font-size: 1.3rem;
    color: #fff;
}

.results-count span {
    color: #64ffda;
    font-weight: 700;
    font-size: 1.5rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn-secondary, .btn-export {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: none;
}

.btn-secondary {
    background: #2d3748;
    color: #fff;
}

.btn-secondary:hover {
    background: #3d4758;
}

.btn-export {
    background: linear-gradient(135deg, #64ffda, #4fd1c5);
    color: #0a0e27;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

/* Results Display */
.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Company Cards */
.company-card {
    background: #1a1d3a;
    border-radius: 12px;
    border: 1px solid #2d3748;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.company-card:hover {
    border-color: #64ffda;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(100, 255, 218, 0.15);
}

.company-card-header {
    margin-bottom: 1rem;
}

.company-name {
    font-size: 1.3rem;
    margin: 0 0 0.75rem 0;
}

.company-name a {
    color: #64ffda;
    text-decoration: none;
    transition: color 0.2s ease;
}

.company-name a:hover {
    color: #4fd1c5;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.meta-item {
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.company-card-body {
    margin-bottom: 1rem;
}

.company-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.company-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-badge {
    background: #2d3748;
    color: #64ffda;
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-more {
    color: #888;
    font-size: 0.8rem;
    font-style: italic;
}

.company-card-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2d3748;
}

.btn-link {
    color: #64ffda;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #4fd1c5;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
}

.spinner {
    border: 3px solid #2d3748;
    border-top: 3px solid #64ffda;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* No Results State */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #888;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #ff6b6b;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-hero h1 {
        font-size: 2rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .results-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-secondary, .btn-export {
        width: 100%;
    }

    .search-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-hero {
        padding: 2rem 1rem;
    }

    .search-hero h1 {
        font-size: 1.5rem;
    }

    .company-card {
        padding: 1rem;
    }
}
