/* new-search.css - Modern search page styling */

/* Page Wrapper */
.search-page-wrapper {
    min-height: calc(100vh - 73px);
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    padding: 2rem 1rem;
}

.search-page-container {
    max-width: 56rem;
    margin: 0 auto;
}

/* Search Input Section */
.search-page-input-section {
    margin-bottom: 2rem;
    animation: fadeInDown 0.5s ease-out;
}

.search-page-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-slate-900);
    text-align: center;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.025em;
}

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

.search-icon-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding-left: 1.25rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}

.search-icon {
    height: 1.25rem;
    width: 1.25rem;
    color: var(--text-slate-400);
    transition: color 0.2s;
}

.search-page-input {
    display: block;
    width: 100%;
    padding: 1.125rem 3rem 1.125rem 3rem;
    background-color: white;
    border: 2px solid var(--slate-200);
    border-radius: 1rem;
    color: var(--text-slate-900);
    font-size: 1.125rem;
    box-sizing: border-box;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-page-input::placeholder {
    color: var(--text-slate-400);
}

.search-page-input:focus {
    outline: none;
    border-color: var(--primary-blue-600);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-page-input-wrapper:focus-within .search-icon {
    color: var(--primary-blue-600);
}

.clear-search-btn {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background-color: var(--slate-200);
    color: var(--text-slate-600);
}

.search-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-slate-500);
    text-align: center;
}

/* Search Results Area */
.search-results-area {
    min-height: 400px;
}

/* Initial State */
.initial-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.initial-state-icon {
    color: var(--primary-blue-600);
    margin-bottom: 1.5rem;
}

.initial-state-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-slate-900);
    margin-bottom: 0.75rem;
}

.initial-state-description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-slate-700);
    max-width: 48rem;
    font-weight: 400;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--primary-blue-100);
    border-top-color: var(--primary-blue-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-slate-600);
    font-size: 0.875rem;
}

/* Results Container */
.results-container {
    animation: fadeInUp 0.5s ease-out;
}

.results-section {
    margin-bottom: 3rem;
}

.results-section:last-child {
    margin-bottom: 0;
}

.results-section-header {
    margin-bottom: 1.5rem;
}

.results-section-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-icon {
    color: var(--primary-blue-600);
    flex-shrink: 0;
}

.section-icon-expert {
    color: #7e22ce;
}

.results-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-slate-900);
    margin: 0;
}

.results-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.5rem;
    background-color: var(--primary-blue-100);
    color: var(--primary-blue-700);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    border: 1px solid var(--primary-blue-200);
}

.results-count-badge-expert {
    background-color: #f3e8ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}

.results-section-subtitle {
    font-size: 0.875rem;
    color: var(--text-slate-600);
    margin: 0;
}

/* Results Grid */
.results-grid {
    display: grid;
    gap: 1rem;
}

/* Result Cards */
.search-result-card {
    background-color: white;
    border: 2px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.agent-result-card:hover {
    border-color: var(--primary-blue-400);
}

.expert-result-card:hover {
    border-color: #d8b4fe;
}

.result-card-badge-container {
    position: absolute;
    top: 0.7rem;
    right: 1rem;
}

.result-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.result-card-avatar-section {
    flex-shrink: 0;
}

.result-card-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--slate-200);
}

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

.result-card-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-slate-600);
}

.result-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-card-badge-agent {
    background-color: var(--primary-blue-600);
    color: white;
}

.result-card-badge-expert {
    background-color: #7e22ce;
    color: white;
}

.result-card-content {
    flex: 1;
    min-width: 0;
}

.result-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-slate-900);
    margin: 0 0 0.5rem 0;
    transition: color 0.2s;
}

.agent-result-card:hover .result-card-title {
    color: var(--primary-blue-700);
}

.expert-result-card:hover .result-card-title {
    color: #7e22ce;
}

.result-card-description {
    font-size: 0.875rem;
    color: var(--text-slate-600);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-card-meta {
    font-size: 0.75rem;
    color: var(--text-slate-500);
    margin: 0.5rem 0 0 0;
    padding-left: 4.5rem;
}

.expert-name-link {
    color: var(--text-slate-900);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.expert-name-link:hover {
    color: var(--primary-blue-700);
    text-decoration: underline;
}

.result-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.result-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    background-color: var(--primary-blue-50);
    color: var(--primary-blue-700);
    border: 1px solid var(--primary-blue-200);
    border-radius: 9999px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}

.empty-state-icon {
    color: var(--text-slate-400);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-slate-900);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--text-slate-600);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.empty-state-suggestion {
    color: var(--text-slate-500);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.empty-state-btn {
    background-color: var(--primary-blue-600);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

.empty-state-btn:hover {
    background-color: var(--primary-blue-700);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.3);
    transform: translateY(-1px);
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}

.error-state-icon {
    color: #dc2626;
    margin-bottom: 1rem;
}

.error-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-slate-900);
    margin-bottom: 0.5rem;
}

.error-state-description {
    color: var(--text-slate-600);
    margin-bottom: 1.5rem;
}

.retry-btn {
    background-color: var(--primary-blue-600);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

.retry-btn:hover {
    background-color: var(--primary-blue-700);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.3);
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .search-page-wrapper {
        padding: 1rem 0.75rem;
    }

    .search-page-heading {
        font-size: 1.75rem;
    }

    .search-page-input {
        font-size: 1rem;
        padding: 1rem 2.75rem 1rem 2.75rem;
    }

    .initial-state-title {
        font-size: 1.5rem;
    }

    .results-section-title {
        font-size: 1.25rem;
    }

    .result-card-avatar {
        width: 3rem;
        height: 3rem;
    }

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

    .search-result-card {
        padding: 1rem;
    }

    .result-card-badge {
        padding: 0.2rem;
        min-width: 1.25rem;
        min-height: 1.25rem;
        justify-content: center;
    }

    .result-card-badge span {
        display: none;
    }
}

@media (min-width: 768px) {
    .results-grid {
        gap: 1.25rem;
    }

    .search-result-card {
        padding: 1.5rem;
    }
}

/* Indigo Selection Color (from parent) */
:root {
    --indigo-50: #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-600: #4f46e5;
    --indigo-900: #312e81;
}
