.team-members-block-editor {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    /* Ensure editor matches frontend */
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.team-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.team-members-header h3 {
    margin: 0;
    color: #1e1e1e;
    font-size: 1.25rem;
    font-weight: 600;
}

.add-member-button {
    background: #FF4500 !important;
    border-color: #FF4500 !important;
}

.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.team-member-editor-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
    position: relative;
    /* Match frontend formatting */
    font-family: inherit;
    line-height: inherit;
}

.member-controls {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
}

.remove-member {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.member-image-section {
    margin-bottom: 1rem;
}

.member-image-upload {
    text-align: center;
}

.has-image img {
    max-width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    border: 2px solid #e0e0e0;
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FFA500, #FF4500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.member-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.no-members {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.no-members p {
    margin-bottom: 1rem;
    font-style: italic;
}

/* Component overrides */
.team-members-block-editor .components-text-control__input {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 0.75rem;
}

.team-members-block-editor .components-text-control__input:focus {
    border-color: #FF4500;
    box-shadow: 0 0 0 1px #FF4500;
}

.team-members-block-editor .components-base-control__label {
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 0.5rem;
}

/* Preview that matches frontend exactly */
.team-members-preview {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.team-members-preview .team-members-block {
    /* Match frontend styles exactly */
    padding: 1rem 0;
}

.team-members-preview .team-member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);

    margin-bottom: 0.5rem;
}

.team-members-preview .team-member-image {
    flex-shrink: 0;
    background: linear-gradient(135deg, #FFA500, #FF4500);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-members-preview .team-member-info {
    flex: 1;
    text-align: left;
}

.team-members-preview .team-member-name {
    font-weight: 600;
    color: #FF4500;
    margin: 0;
    font-size: inherit;
}

.team-members-preview .team-member-position {
    color: #555555;
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

.team-members-preview .team-member-email {
    color: #FFA500;
    font-size: 0.9em;
    margin: 0;
}

/* Editor preview for line layout */
.team-members-block-editor .layout-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.team-members-block-editor .layout-preview h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.team-members-block-editor .preview-compact {
    display: flex;
    gap: 0.5rem;
}

.team-members-block-editor .preview-compact .preview-card {
    flex: 1;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
}

.team-members-block-editor .preview-line .preview-line-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.7rem;
}

.team-members-block-editor .preview-line .preview-line-item:last-child {
    border-bottom: none;
}

.team-members-block-editor .preview-avatar {
    width: 20px;
    height: 20px;
    background: #FF4500;
    border-radius: 50%;
    flex-shrink: 0;
}

.team-members-block-editor .preview-info {
    flex: 1;
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .team-members-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }
    
    .member-fields {
        grid-template-columns: 1fr;
    }
}
