/* Search Page Styles */

/* Search Main Content */
.search-main {
    padding: 20px 16px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 140px);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Search Container */
.search-container {
    margin-bottom: 24px;
}

.search-bar {
    position: relative;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.search-icon {
    color: #6c757d;
    font-size: 16px;
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #000;
    background: none;
}

.search-bar input::placeholder {
    color: #6c757d;
}

/* Coaches List */
.coaches-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Coach Card */
.coach-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 16px;
    transition: all 0.3s ease;
    animation: cardSlideIn 0.5s ease-out;
    width: 100%;
    box-sizing: border-box;
}

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

.coach-card.hidden {
    display: none;
}

/* Coach Avatar */
.coach-avatar {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 0;
    display: block;
    transition: transform 0.3s ease;
}

.coach-card:hover .avatar-img {
    transform: scale(1.05);
}

/* Coach Info */
.coach-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coach-name {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.specialization-tag {
    display: inline-block;
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.coach-bio {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin: 8px 0;
    flex: 1;
}

.view-profile-btn {
    background: none;
    border: 1px solid #e9ecef;
    color: #000;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.view-profile-btn:hover {
    border-color: #e91e63;
    color: #e91e63;
    background-color: #fff5f8;
}

.view-profile-btn:active {
    transform: scale(0.98);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.no-results p {
    font-size: 14px;
    margin: 0;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-tag {
    background-color: #fff;
    border: 1px solid #e9ecef;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    border-color: #e91e63;
    color: #e91e63;
}

.filter-tag.active {
    background-color: #e91e63;
    border-color: #e91e63;
    color: white;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #000;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.coach-card {
    animation: cardSlideIn 0.5s ease-out;
}

.coach-card:nth-child(1) { animation-delay: 0.1s; }
.coach-card:nth-child(2) { animation-delay: 0.2s; }
.coach-card:nth-child(3) { animation-delay: 0.3s; }
.coach-card:nth-child(4) { animation-delay: 0.4s; }
.coach-card:nth-child(5) { animation-delay: 0.5s; }

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e91e63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .search-main {
        padding: 16px 12px;
        width: 100%;
        overflow-x: hidden;
    }
    
    .coach-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .coach-avatar {
        align-self: center;
        width: 74px;
        height: 74px;
    }
    
    .avatar-img {
        width: 100%;
        height: 100%;
    }
    
    .coach-name {
        font-size: 16px;
    }
    
    .coach-bio {
        font-size: 13px;
    }
    
    .view-profile-btn {
        align-self: center;
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .search-main {
        background-color: #1a1a1a;
    }
    
    .coach-card {
        background-color: #2a2a2a;
    }
    
    .coach-name {
        color: #fff;
    }
    
    .coach-bio {
        color: #ccc;
    }
    
    .search-bar {
        background-color: #2a2a2a;
        border-color: #333;
    }
    
    .search-bar input {
        color: #fff;
    }
    
    .specialization-tag {
        background-color: #333;
        color: #ccc;
    }
    
    .view-profile-btn {
        border-color: #333;
        color: #fff;
    }
    
    .view-profile-btn:hover {
        border-color: #e91e63;
        color: #e91e63;
        background-color: #2a2a2a;
    }
}
