/* Member Directory Component Styles */

.member-directory {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: auto;
    padding: 0;
}

.member-directory-container {
    display: flex;
    margin: 0 auto;
    gap: 30px;
}

/* Sidebar Styles */
.member-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: white;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #7952b3;
}

/* Search Styles - Scoped to Member Directory */
.member-sidebar .search-container {
    position: relative;
    margin-bottom: 24px;
}

.member-sidebar .search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.member-sidebar .search-input:focus {
    outline: none;
    border-color: #7952b3;
    background: white;
    box-shadow: 0 0 0 3px rgba(121, 82, 179, 0.1);
}

.member-sidebar .search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
}

.member-sidebar .search-btn:hover {
    color: #7952b3;
}

/* Filter Section Styles */
.filter-section {
    margin-bottom: 24px;
}

.filter-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.member-sidebar .filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.member-sidebar .filter-select:focus {
    outline: none;
    border-color: #7952b3;
    box-shadow: 0 0 0 3px rgba(121, 82, 179, 0.1);
}

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

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.filter-option:hover {
    background-color: #f8f9fa;
}

.filter-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.filter-label {
    font-size: 14px;
    color: #555;
    user-select: none;
}

/* Clear Filters Button - Scoped to Member Directory */
.member-sidebar .clear-filters-btn {
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.member-sidebar .clear-filters-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* Directory Stats */
.directory-stats {
    background: #7952b3;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: auto;
}

.stats-section {
    font-size: 14px;
}

.stats-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
}

.stat-section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 16px 0;
}

.stat-subtitle {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}

.country-name {
    color: rgba(255, 255, 255, 0.9);
}

.country-count {
    font-weight: 600;
}

/* Main Content Area */
.member-content {
    flex: 1;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.directory-title,
.results-header h1.directory-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.member-content .sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.member-content .sort-select:focus {
    outline: none;
    border-color: #7952b3;
    box-shadow: 0 0 0 3px rgba(121, 82, 179, 0.1);
}

.view-controls {
    display: flex;
    gap: 4px;
}

.view-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.member-content .view-btn {
    padding: 8px 12px;
    background: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #ddd;
}

.member-content .view-btn:last-child {
    border-right: none;
}

.member-content .view-btn.active {
    background: #7952b3;
    color: white;
}

.member-content .view-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Results Count */
.results-count {
    margin-bottom: 20px;
}

.count-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.members-grid[data-view-mode="list"] {
    grid-template-columns: 1fr;
}

/* Member Card */
.member-card {
    background: white;
    border: 1px solid #e9ecef;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

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

/* Sponsored Member Card - matches resource library sponsored style */
.member-card.sponsored-card {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, #fffef9 0%, #ffffff 100%);
}

.member-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #7952b3;
    color: white;
    font-size: 32px;
    font-weight: 600;
}

.partner-logo {
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

.member-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.member-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.member-company {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.member-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.member-meta i {
    font-size: 12px;
}

.member-link {
    display: inline-block;
    padding: 8px 16px;
    background: #7952b3;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.member-link:hover {
    background: #6842a3;
    transform: translateY(-1px);
}

.member-link i {
    margin-left: 4px;
    font-size: 12px;
}

/* Partner Learn More Link */
.partner-learn-more {
    text-align: center;
    margin-top: 12px;
}

.learn-more-link {
    color: #7952b3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.learn-more-link:hover {
    color: #6842a3;
    text-decoration: underline;
}

/* List View Styles */
.members-grid[data-view-mode="list"] .member-card {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 20px;
}

.members-grid[data-view-mode="list"] .member-avatar,
.members-grid[data-view-mode="list"] .partner-logo {
    width: 60px;
    height: 60px;
    margin: 0;
    flex-shrink: 0;
}

.members-grid[data-view-mode="list"] .avatar-placeholder {
    font-size: 20px;
}

/* No Results */
/* Empty State - Match Resource Library Style */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    grid-column: 1 / -1; /* Span full width of grid */
    width: 100%;
}

.no-results .empty-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.no-results .empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.no-results .empty-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Legacy support for direct styling */
.no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.no-results p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #f8f9fa;
    color: #333;
}

.page-item.active .page-link {
    background: #7952b3;
    color: white;
    border-color: #7952b3;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .member-directory-container {
        flex-direction: column;
    }

    .member-sidebar {
        width: 100%;
        position: static;
    }

    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .view-controls, .sort-controls {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .members-grid {
        grid-template-columns: 1fr;
    }

    .header-controls {
        flex-direction: column;
        gap: 12px;
    }

    .view-controls, .sort-controls {
        justify-content: center;
    }

    .sort-select {
        flex: 1;
    }
}
