/**
 * MP Members Directory - Structural Styles
 */

.mp-directory {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

/* Filters Bar */
.mp-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    align-items: center;
}

.mp-filter-group {
    flex: 1 1 200px;
}

.mp-filters-bar input,
.mp-filters-bar select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
}

.mp-clear-filters {
    font-family: "Open Sans", Sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    background-color: var( --e-global-color-accent ) !important;
    padding: 0 16px;
    height: 40px;
    cursor: pointer;
    color: #fff !important;
    border: 1px solid var( --e-global-color-accent ) !important;
}

.mp-clear-filters:hover,
.mp-clear-filters:focus {
    background-color: var( --e-global-color-71a34cf ) !important;
    border-color: var( --e-global-color-71a34cf ) !important;
    color: var( --e-global-color-text ) !important;
}

/* View Toggle */
.mp-view-toggle {
    display: flex;
    gap: 5px;
}

.mp-view-toggle button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #FF7200;
    cursor: pointer;
}

.mp-view-toggle button:focus,
.mp-view-toggle button:hover {
    background-color: var( --e-global-color-accent ) !important;
    border-color: var( --e-global-color-accent ) !important;
    color: #fff !important;
}

.mp-view-toggle button.mp-active {
    background: #FF7200;
    color: #fff;
}

/* Results Count */
.mp-results-count {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

/* Container */
.mp-members-container {
    display: grid;
    gap: 20px;
}

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

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

/* Member Card */
.mp-member-card {
    display: flex;
    border: 1px solid #01959AD9;
    padding: 15px;
    background: #fff;
    transition: box-shadow 0.3s;
}

.mp-member-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mp-view-grid .mp-member-card {
    flex-direction: column;
}

.mp-view-list .mp-member-card {
    flex-direction: row;
    align-items: center;
}

/* Photo */
.mp-member-photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-right: 20px;
    overflow: hidden;
    border-radius: 50%;
}

.mp-view-grid .mp-member-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    margin-right: 0;
    margin-bottom: 15px;
    border-radius: 4px;
}

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

.mp-member-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

/* Info */
.mp-member-info {
    flex-grow: 1;
}

.mp-member-name {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.mp-member-info p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
}

.mp-label {
    font-weight: bold;
    color: #555;
}

/* Pagination */
.mp-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mp-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #eee;
    text-decoration: none;
    color: #333;
    min-width: 40px;
    text-align: center;
}

.mp-pagination .page-numbers.current {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* States */
.mp-loading {
    text-align: center;
    padding: 20px;
}

.mp-no-results {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border: 1px solid #eee;
}

/* Responsive fixes */
@media (max-width: 767px) {
    .mp-view-list .mp-member-card {
        flex-direction: column;
        text-align: center;
    }
    .mp-view-list .mp-member-photo {
        margin: 0 auto 15px auto;
    }
}
