/* ====================================
   PROVIDER SEARCH STYLES
   ==================================== */

/* Search Container */
.provider-search-container {
    position: relative;
    max-width: 48rem;
    margin: 0 auto;
    z-index: 50;
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 10;
    transition: color 0.3s ease;
}

.search-input-wrapper .search-icon.searching {
    animation: spin 1s linear infinite;
    color: #3b82f6;
}

/* Search Input */
.search-input {
    width: 100%;
    background: linear-gradient(135deg, #1a1f2e 0%, #151a26 100%);
    border: 2px solid rgba(75, 85, 99, 0.5);
    border-radius: 1rem;
    padding: 1.25rem 3.5rem 1.25rem 4rem;
    color: #ffffff;
    font-size: 1.125rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.search-input::placeholder {
    color: #6b7280;
}

.search-input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1),
    0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Clear Button */
.search-clear-btn {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 85, 99, 0.5);
    border: none;
    border-radius: 0.5rem;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.search-clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.search-clear-btn:hover {
    background: rgba(107, 114, 128, 0.5);
    color: #ffffff;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1f2e 0%, #151a26 100%);
    border: 2px solid rgba(75, 85, 99, 0.5);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: all 0.2s ease;
}

.search-results-dropdown.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Custom Scrollbar */
.search-results-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
    border-radius: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.9);
}

/* Loading State */
.search-loading {
    padding: 2rem;
    text-align: center;
}

.search-loading .spinner {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 0.75rem;
    animation: spin 1s linear infinite;
}

.search-loading p {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Search Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: linear-gradient(90deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(168, 85, 247, 0.1) 100%);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Provider Logo */
.result-logo {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.result-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Result Info */
.result-info {
    flex-grow: 1;
    min-width: 0;
}

.result-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.search-result-item:hover .result-name {
    color: #3b82f6;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.result-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.result-meta img {
    width: 1rem;
    height: 0.75rem;
    border-radius: 0.125rem;
}

.result-meta i {
    color: #6b7280;
}

.result-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

/* Result Stats */
.result-stats {
    flex-shrink: 0;
    text-align: right;
}

.result-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.result-rating span {
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.875rem;
}

.result-rating i {
    color: #fbbf24;
    font-size: 0.75rem;
}

.result-plans {
    font-size: 0.75rem;
    color: #6b7280;
}

/* No Results */
.search-no-results {
    padding: 2rem;
    text-align: center;
}

.search-no-results .icon-wrapper {
    width: 4rem;
    height: 4rem;
    background: rgba(75, 85, 99, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.search-no-results i {
    font-size: 2rem;
    color: #6b7280;
}

.search-no-results h3 {
    color: #9ca3af;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-no-results p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* View All Footer */
.search-view-all {
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    padding: 1rem;
    text-align: center;
    background: linear-gradient(90deg,
    rgba(59, 130, 246, 0.05) 0%,
    rgba(168, 85, 247, 0.05) 100%);
}

.search-view-all a {
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.search-view-all a:hover {
    color: #60a5fa;
}

.search-view-all i {
    font-size: 0.75rem;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-input {
        padding: 1rem 3rem 1rem 3.5rem;
        font-size: 1rem;
    }

    .search-input-wrapper .search-icon {
        left: 1rem;
        font-size: 1rem;
    }

    .search-clear-btn {
        width: 2rem;
        height: 2rem;
        right: 1rem;
    }

    .search-result-item {
        padding: 1rem;
        gap: 0.75rem;
    }

    .result-logo {
        width: 3rem;
        height: 3rem;
    }

    .result-name {
        font-size: 1rem;
    }

    .result-stats {
        display: none;
    }
}