/**
 * Members Directory Styles
 *
 * Styles for the members directory page template.
 *
 * @package Videohub360_Theme
 * @since 1.0.0
 */

/* Container */
.vh360-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Members Directory Header - Styles controlled by dynamic-css.php via CSS variables */
/* Note: background, color, padding, text-align, margin-bottom are set in dynamic-css.php */

.vh360-members-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.vh360-members-description {
    font-size: 1.125rem;
    margin: 0 0 1.5rem;
    opacity: 0.95;
}

.vh360-member-count {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.vh360-count-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.vh360-count-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controls Section */
.vh360-members-controls {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Search Bar */
.vh360-search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.vh360-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    transition: all 0.3s ease;
    outline: none;
}

.vh360-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vh360-search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.vh360-search-clear:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Filters Wrapper */
.vh360-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.vh360-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vh360-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.vh360-filter-select {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vh360-filter-select:hover {
    border-color: #9ca3af;
}

.vh360-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* View Toggle */
.vh360-view-toggle {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.vh360-view-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vh360-view-btn:hover {
    color: #1f2937;
}

.vh360-view-btn.active {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Members Content */
.vh360-members-content {
    padding-bottom: 3rem;
}

/* Members Grid */
.vh360-members-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.vh360-members-grid.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.vh360-members-grid.view-list {
    grid-template-columns: 1fr;
}

.vh360-members-grid.view-list .vh360-profile-card {
    display: flex;
    flex-direction: row;
    text-align: left;
}

.vh360-members-grid.view-list .vh360-profile-card-link {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

.vh360-members-grid.view-list .vh360-profile-card-avatar {
    margin-bottom: 0;
    flex-shrink: 0;
}

.vh360-members-grid.view-list .vh360-profile-card-body {
    text-align: left;
    flex: 1;
}

.vh360-members-grid.view-list .vh360-profile-card-stats {
    border-top: none;
    border-left: 1px solid var(--border-color, #e5e7eb);
    padding-top: 0;
    padding-left: 1.5rem;
    flex-direction: column;
    flex-shrink: 0;
    width: auto;
}

/* Loading State */
.vh360-loading {
    text-align: center;
    padding: 3rem 0;
}

.vh360-spinner {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: vh360-spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Empty State */
.vh360-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.vh360-empty-icon {
    margin-bottom: 1.5rem;
}

.vh360-empty-icon svg {
    color: #d1d5db;
}

.vh360-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

.vh360-empty-text {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Pagination */
.vh360-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.vh360-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vh360-pagination-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #667eea;
    color: #667eea;
}

.vh360-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vh360-pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.vh360-pagination-info span {
    font-weight: 600;
    color: #1f2937;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vh360-members-title {
        font-size: 2rem;
    }
    
    .vh360-members-description {
        font-size: 1rem;
    }
    
    .vh360-filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vh360-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vh360-filter-select {
        width: 100%;
    }
    
    .vh360-view-toggle {
        margin-left: 0;
        align-self: center;
    }
    
    .vh360-members-grid.view-grid {
        grid-template-columns: 1fr;
    }
    
    .vh360-members-grid.view-list .vh360-profile-card-link {
        flex-direction: column;
        text-align: center;
    }
    
    .vh360-members-grid.view-list .vh360-profile-card-body {
        text-align: center;
    }
    
    .vh360-members-grid.view-list .vh360-profile-card-stats {
        border-left: none;
        border-top: 1px solid var(--border-color, #e5e7eb);
        padding-left: 0;
        padding-top: 1rem;
        flex-direction: row;
        width: 100%;
    }
    
    .vh360-pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .vh360-members-header {
        padding: 2rem 0 1.5rem;
    }
    
    .vh360-members-title {
        font-size: 1.75rem;
    }
    
    .vh360-count-number {
        font-size: 1.25rem;
    }
    
    .vh360-pagination {
        flex-wrap: wrap;
    }
    
    .vh360-pagination-info {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 1rem;
    }
}

/* Animations */
.vh360-profile-card {
    animation: vh360-fadeIn 0.5s ease;
}

@keyframes vh360-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading overlay for grid */
.vh360-members-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}


/* Mobile Filters Toggle */
.vh360-controls-toggle {
    display: none !important;
    width: 100%;
    margin: 0 0 1rem 0;
    padding: 0.9rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    font-weight: 600;
    cursor: pointer;
}

.vh360-controls-toggle[aria-expanded="true"] {
    background: #ffffff;
}

@media (max-width: 768px) {
    .vh360-controls-panel.is-collapsed {
        display: none;
    }

    .vh360-controls-toggle {
        display: block !important;
    }
}
