/* Team Member Display Plugin Styles */

/* General Styles */
.team-member-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Image Styles */
.team-member-image-wrapper {
    text-align: center;
    margin-bottom: 15px;
}

.team-member-image {
    border-radius: 50%;
    max-width: 150px;
    height: auto;
    border: 3px solid #f0f0f0;
}

/* Name Styles */
.team-member-name {
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-align: center;
    line-height: 1.3;
}

/* Content Area */
.team-member-content {
    text-align: left;
}

/* Fields Styles */
.team-member-fields {
    margin-top: 15px;
}

.team-member-field {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.team-member-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.field-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    margin-right: 10px;
    font-size: 0.9em;
}

.field-value {
    color: #333;
    flex: 1;
    font-size: 0.95em;
}

/* Grid Layout for Multiple Members */
.team-members-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.team-members-grid.columns-1 {
    grid-template-columns: 1fr;
}

.team-members-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.team-members-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.team-members-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Single Member Display */
.team-member-single {
    max-width: 500px;
    margin: 20px auto;
}

/* Widget Styles */
.widget .team-member-card {
    margin-bottom: 15px;
    padding: 15px;
}

.widget .team-member-name {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.widget .team-member-image {
    max-width: 80px;
}

.widget .team-member-field {
    margin-bottom: 5px;
    padding: 3px 0;
}

.widget .field-label {
    min-width: 80px;
    font-size: 0.8em;
}

.widget .field-value {
    font-size: 0.8em;
}

/* Responsive Design */
@media (max-width: 768px) {

    .team-members-grid.columns-3,
    .team-members-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-member-field {
        flex-direction: column;
        align-items: flex-start;
    }

    .field-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 3px;
    }
}

@media (max-width: 480px) {
    .team-members-grid {
        grid-template-columns: 1fr;
    }

    .team-member-card {
        padding: 15px;
    }

    .team-member-image {
        max-width: 120px;
    }

    .team-member-name {
        font-size: 1.2em;
    }
}

/* Loading and Error States */
.team-member-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.team-member-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 10px 0;
}

/* Admin Page Styles */
.team-member-admin .card {
    max-width: none;
    margin-bottom: 20px;
}

.team-member-admin code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Print Styles */
@media print {
    .team-member-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .team-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .team-member-card {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .team-member-name {
        color: #fff;
    }

    .field-label {
        color: #ccc;
    }

    .field-value {
        color: #e0e0e0;
    }

    .team-member-field {
        border-bottom-color: #444;
    }
}

/* Accessibility Improvements */
.team-member-card:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.team-member-image {
    alt: attr(alt);
}

/* Animation for loading state */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-member-card {
    animation: fadeIn 0.3s ease-out;
}