/* Membership Directory Styles */

#membership-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Styles */
.directory-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-item {
    flex: 1;
    min-width: 250px;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.filter-item select,
.filter-item input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.filter-item select:focus,
.filter-item input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Demographic Filters */
.demographic-filters {
    margin-bottom: 20px;
}

.demographic-filters > label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: rgba(0, 124, 186, 0.1);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007cba;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* Initial Message */
.initial-message {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
    margin-bottom: 30px;
}

/* Loading Indicator */
#loading-indicator {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Member Card */
.member-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.member-card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.business-name {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.business-name.no-data {
    color: #999;
    font-style: italic;
}

.member-card-body {
    flex: 1;
}

.info-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
}

.info-row .label {
    font-weight: bold;
    color: #333;
    min-width: 80px;
    margin-right: 10px;
}

.info-row .value {
    color: #666;
    flex: 1;
}

.info-row .value.no-data {
    color: #999;
    font-style: italic;
}

.info-row a {
    color: #007cba;
    text-decoration: none;
}

.info-row a:hover {
    text-decoration: underline;
}

/* Demographics */
.demographics {
    margin-top: 15px;
}

.demographic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.demographic-tag {
    background-color: #e7f3ff;
    color: #0056b3;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* No Members Found */
.no-members-found {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
    grid-column: 1 / -1;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination {
    display: flex;
    gap: 5px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-btn:hover {
    background-color: #f8f9fa;
    border-color: #007cba;
}

.page-btn.active {
    background-color: #007cba;
    color: white;
    border-color: #007cba;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    #membership-directory {
        padding: 15px;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        justify-content: stretch;
    }
    
    .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .member-card {
        padding: 15px;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-row .label {
        margin-bottom: 3px;
    }
    
    .demographic-tags {
        justify-content: flex-start;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}